summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2019-04-13 20:18:31 +0100
committerCharles Pigott <charlespigott@googlemail.com>2019-04-13 20:35:10 +0100
commit4f052fc2a4f22dbb08c2a58e262eca99f8281000 (patch)
treee34c031858a355aedee47e3532cd28fbd80cb6b7
parent410b81537cd28e133acfc423efc88627f4454676 (diff)
downloadopenttd-4f052fc2a4f22dbb08c2a58e262eca99f8281000.tar.xz
Cleanup: Fix alignment after NULL -> nullptr change.
-rw-r--r--src/newgrf.cpp42
-rw-r--r--src/saveload/economy_sl.cpp6
-rw-r--r--src/saveload/engine_sl.cpp2
-rw-r--r--src/saveload/industry_sl.cpp8
-rw-r--r--src/saveload/linkgraph_sl.cpp4
-rw-r--r--src/saveload/map_sl.cpp20
-rw-r--r--src/saveload/misc_sl.cpp2
-rw-r--r--src/saveload/object_sl.cpp2
-rw-r--r--src/saveload/oldloader.h10
-rw-r--r--src/saveload/saveload.cpp6
-rw-r--r--src/saveload/station_sl.cpp2
-rw-r--r--src/saveload/story_sl.cpp2
-rw-r--r--src/saveload/town_sl.cpp2
-rw-r--r--src/strgen/strgen.cpp2
14 files changed, 55 insertions, 55 deletions
diff --git a/src/newgrf.cpp b/src/newgrf.cpp
index 4dbc6273e..7e4ba801d 100644
--- a/src/newgrf.cpp
+++ b/src/newgrf.cpp
@@ -8945,27 +8945,27 @@ static void DecodeSpecialSprite(byte *buf, uint num, GrfLoadingStage stage)
* is not in memory and scanning the file every time would be too expensive.
* In other stages we skip action 0x10 since it's already dealt with. */
static const SpecialSpriteHandler handlers[][GLS_END] = {
- /* 0x00 */ { nullptr, SafeChangeInfo, nullptr, nullptr, ReserveChangeInfo, FeatureChangeInfo, },
- /* 0x01 */ { SkipAct1, SkipAct1, SkipAct1, SkipAct1, SkipAct1, NewSpriteSet, },
- /* 0x02 */ { nullptr, nullptr, nullptr, nullptr, nullptr, NewSpriteGroup, },
- /* 0x03 */ { nullptr, GRFUnsafe, nullptr, nullptr, nullptr, FeatureMapSpriteGroup, },
- /* 0x04 */ { nullptr, nullptr, nullptr, nullptr, nullptr, FeatureNewName, },
- /* 0x05 */ { SkipAct5, SkipAct5, SkipAct5, SkipAct5, SkipAct5, GraphicsNew, },
- /* 0x06 */ { nullptr, nullptr, nullptr, CfgApply, CfgApply, CfgApply, },
- /* 0x07 */ { nullptr, nullptr, nullptr, nullptr, SkipIf, SkipIf, },
- /* 0x08 */ { ScanInfo, nullptr, nullptr, GRFInfo, GRFInfo, GRFInfo, },
- /* 0x09 */ { nullptr, nullptr, nullptr, SkipIf, SkipIf, SkipIf, },
- /* 0x0A */ { SkipActA, SkipActA, SkipActA, SkipActA, SkipActA, SpriteReplace, },
- /* 0x0B */ { nullptr, nullptr, nullptr, GRFLoadError, GRFLoadError, GRFLoadError, },
- /* 0x0C */ { nullptr, nullptr, nullptr, GRFComment, nullptr, GRFComment, },
- /* 0x0D */ { nullptr, SafeParamSet, nullptr, ParamSet, ParamSet, ParamSet, },
- /* 0x0E */ { nullptr, SafeGRFInhibit, nullptr, GRFInhibit, GRFInhibit, GRFInhibit, },
- /* 0x0F */ { nullptr, GRFUnsafe, nullptr, FeatureTownName, nullptr, nullptr, },
- /* 0x10 */ { nullptr, nullptr, DefineGotoLabel, nullptr, nullptr, nullptr, },
- /* 0x11 */ { SkipAct11,GRFUnsafe, SkipAct11, GRFSound, SkipAct11, GRFSound, },
- /* 0x12 */ { SkipAct12, SkipAct12, SkipAct12, SkipAct12, SkipAct12, LoadFontGlyph, },
- /* 0x13 */ { nullptr, nullptr, nullptr, nullptr, nullptr, TranslateGRFStrings, },
- /* 0x14 */ { StaticGRFInfo, nullptr, nullptr, nullptr, nullptr, nullptr, },
+ /* 0x00 */ { nullptr, SafeChangeInfo, nullptr, nullptr, ReserveChangeInfo, FeatureChangeInfo, },
+ /* 0x01 */ { SkipAct1, SkipAct1, SkipAct1, SkipAct1, SkipAct1, NewSpriteSet, },
+ /* 0x02 */ { nullptr, nullptr, nullptr, nullptr, nullptr, NewSpriteGroup, },
+ /* 0x03 */ { nullptr, GRFUnsafe, nullptr, nullptr, nullptr, FeatureMapSpriteGroup, },
+ /* 0x04 */ { nullptr, nullptr, nullptr, nullptr, nullptr, FeatureNewName, },
+ /* 0x05 */ { SkipAct5, SkipAct5, SkipAct5, SkipAct5, SkipAct5, GraphicsNew, },
+ /* 0x06 */ { nullptr, nullptr, nullptr, CfgApply, CfgApply, CfgApply, },
+ /* 0x07 */ { nullptr, nullptr, nullptr, nullptr, SkipIf, SkipIf, },
+ /* 0x08 */ { ScanInfo, nullptr, nullptr, GRFInfo, GRFInfo, GRFInfo, },
+ /* 0x09 */ { nullptr, nullptr, nullptr, SkipIf, SkipIf, SkipIf, },
+ /* 0x0A */ { SkipActA, SkipActA, SkipActA, SkipActA, SkipActA, SpriteReplace, },
+ /* 0x0B */ { nullptr, nullptr, nullptr, GRFLoadError, GRFLoadError, GRFLoadError, },
+ /* 0x0C */ { nullptr, nullptr, nullptr, GRFComment, nullptr, GRFComment, },
+ /* 0x0D */ { nullptr, SafeParamSet, nullptr, ParamSet, ParamSet, ParamSet, },
+ /* 0x0E */ { nullptr, SafeGRFInhibit, nullptr, GRFInhibit, GRFInhibit, GRFInhibit, },
+ /* 0x0F */ { nullptr, GRFUnsafe, nullptr, FeatureTownName, nullptr, nullptr, },
+ /* 0x10 */ { nullptr, nullptr, DefineGotoLabel, nullptr, nullptr, nullptr, },
+ /* 0x11 */ { SkipAct11, GRFUnsafe, SkipAct11, GRFSound, SkipAct11, GRFSound, },
+ /* 0x12 */ { SkipAct12, SkipAct12, SkipAct12, SkipAct12, SkipAct12, LoadFontGlyph, },
+ /* 0x13 */ { nullptr, nullptr, nullptr, nullptr, nullptr, TranslateGRFStrings, },
+ /* 0x14 */ { StaticGRFInfo, nullptr, nullptr, nullptr, nullptr, nullptr, },
};
GRFLocation location(_cur.grfconfig->ident.grfid, _cur.nfo_line);
diff --git a/src/saveload/economy_sl.cpp b/src/saveload/economy_sl.cpp
index 6161f668f..754d07ebd 100644
--- a/src/saveload/economy_sl.cpp
+++ b/src/saveload/economy_sl.cpp
@@ -102,7 +102,7 @@ static void Ptrs_CAPY()
extern const ChunkHandler _economy_chunk_handlers[] = {
{ 'CAPY', Save_CAPY, Load_CAPY, Ptrs_CAPY, nullptr, CH_ARRAY},
- { 'PRIC', nullptr, Load_PRIC, nullptr, nullptr, CH_RIFF | CH_AUTO_LENGTH},
- { 'CAPR', nullptr, Load_CAPR, nullptr, nullptr, CH_RIFF | CH_AUTO_LENGTH},
- { 'ECMY', Save_ECMY, Load_ECMY, nullptr, nullptr, CH_RIFF | CH_LAST},
+ { 'PRIC', nullptr, Load_PRIC, nullptr, nullptr, CH_RIFF | CH_AUTO_LENGTH},
+ { 'CAPR', nullptr, Load_CAPR, nullptr, nullptr, CH_RIFF | CH_AUTO_LENGTH},
+ { 'ECMY', Save_ECMY, Load_ECMY, nullptr, nullptr, CH_RIFF | CH_LAST},
};
diff --git a/src/saveload/engine_sl.cpp b/src/saveload/engine_sl.cpp
index 0fe190a0f..f4c017bb1 100644
--- a/src/saveload/engine_sl.cpp
+++ b/src/saveload/engine_sl.cpp
@@ -199,5 +199,5 @@ static void Load_EIDS()
extern const ChunkHandler _engine_chunk_handlers[] = {
{ 'EIDS', Save_EIDS, Load_EIDS, nullptr, nullptr, CH_ARRAY },
{ 'ENGN', Save_ENGN, Load_ENGN, nullptr, nullptr, CH_ARRAY },
- { 'ENGS', nullptr, Load_ENGS, nullptr, nullptr, CH_RIFF | CH_LAST },
+ { 'ENGS', nullptr, Load_ENGS, nullptr, nullptr, CH_RIFF | CH_LAST },
};
diff --git a/src/saveload/industry_sl.cpp b/src/saveload/industry_sl.cpp
index 391e5fbc3..34fa14542 100644
--- a/src/saveload/industry_sl.cpp
+++ b/src/saveload/industry_sl.cpp
@@ -184,8 +184,8 @@ static void Load_ITBL()
extern const ChunkHandler _industry_chunk_handlers[] = {
{ 'INDY', Save_INDY, Load_INDY, Ptrs_INDY, nullptr, CH_ARRAY},
- { 'IIDS', Save_IIDS, Load_IIDS, nullptr, nullptr, CH_ARRAY},
- { 'TIDS', Save_TIDS, Load_TIDS, nullptr, nullptr, CH_ARRAY},
- { 'IBLD', LoadSave_IBLD, LoadSave_IBLD, nullptr, nullptr, CH_RIFF},
- { 'ITBL', Save_ITBL, Load_ITBL, nullptr, nullptr, CH_ARRAY | CH_LAST},
+ { 'IIDS', Save_IIDS, Load_IIDS, nullptr, nullptr, CH_ARRAY},
+ { 'TIDS', Save_TIDS, Load_TIDS, nullptr, nullptr, CH_ARRAY},
+ { 'IBLD', LoadSave_IBLD, LoadSave_IBLD, nullptr, nullptr, CH_RIFF},
+ { 'ITBL', Save_ITBL, Load_ITBL, nullptr, nullptr, CH_ARRAY | CH_LAST},
};
diff --git a/src/saveload/linkgraph_sl.cpp b/src/saveload/linkgraph_sl.cpp
index 172025dce..e8f10d3cd 100644
--- a/src/saveload/linkgraph_sl.cpp
+++ b/src/saveload/linkgraph_sl.cpp
@@ -290,7 +290,7 @@ static void Ptrs_LGRS()
}
extern const ChunkHandler _linkgraph_chunk_handlers[] = {
- { 'LGRP', Save_LGRP, Load_LGRP, nullptr, nullptr, CH_ARRAY },
- { 'LGRJ', Save_LGRJ, Load_LGRJ, nullptr, nullptr, CH_ARRAY },
+ { 'LGRP', Save_LGRP, Load_LGRP, nullptr, nullptr, CH_ARRAY },
+ { 'LGRJ', Save_LGRJ, Load_LGRJ, nullptr, nullptr, CH_ARRAY },
{ 'LGRS', Save_LGRS, Load_LGRS, Ptrs_LGRS, nullptr, CH_LAST }
};
diff --git a/src/saveload/map_sl.cpp b/src/saveload/map_sl.cpp
index 18c135117..17a793a09 100644
--- a/src/saveload/map_sl.cpp
+++ b/src/saveload/map_sl.cpp
@@ -298,14 +298,14 @@ static void Save_MAP8()
extern const ChunkHandler _map_chunk_handlers[] = {
{ 'MAPS', Save_MAPS, Load_MAPS, nullptr, Check_MAPS, CH_RIFF },
- { 'MAPT', Save_MAPT, Load_MAPT, nullptr, nullptr, CH_RIFF },
- { 'MAPH', Save_MAPH, Load_MAPH, nullptr, nullptr, CH_RIFF },
- { 'MAPO', Save_MAP1, Load_MAP1, nullptr, nullptr, CH_RIFF },
- { 'MAP2', Save_MAP2, Load_MAP2, nullptr, nullptr, CH_RIFF },
- { 'M3LO', Save_MAP3, Load_MAP3, nullptr, nullptr, CH_RIFF },
- { 'M3HI', Save_MAP4, Load_MAP4, nullptr, nullptr, CH_RIFF },
- { 'MAP5', Save_MAP5, Load_MAP5, nullptr, nullptr, CH_RIFF },
- { 'MAPE', Save_MAP6, Load_MAP6, nullptr, nullptr, CH_RIFF },
- { 'MAP7', Save_MAP7, Load_MAP7, nullptr, nullptr, CH_RIFF },
- { 'MAP8', Save_MAP8, Load_MAP8, nullptr, nullptr, CH_RIFF | CH_LAST },
+ { 'MAPT', Save_MAPT, Load_MAPT, nullptr, nullptr, CH_RIFF },
+ { 'MAPH', Save_MAPH, Load_MAPH, nullptr, nullptr, CH_RIFF },
+ { 'MAPO', Save_MAP1, Load_MAP1, nullptr, nullptr, CH_RIFF },
+ { 'MAP2', Save_MAP2, Load_MAP2, nullptr, nullptr, CH_RIFF },
+ { 'M3LO', Save_MAP3, Load_MAP3, nullptr, nullptr, CH_RIFF },
+ { 'M3HI', Save_MAP4, Load_MAP4, nullptr, nullptr, CH_RIFF },
+ { 'MAP5', Save_MAP5, Load_MAP5, nullptr, nullptr, CH_RIFF },
+ { 'MAPE', Save_MAP6, Load_MAP6, nullptr, nullptr, CH_RIFF },
+ { 'MAP7', Save_MAP7, Load_MAP7, nullptr, nullptr, CH_RIFF },
+ { 'MAP8', Save_MAP8, Load_MAP8, nullptr, nullptr, CH_RIFF | CH_LAST },
};
diff --git a/src/saveload/misc_sl.cpp b/src/saveload/misc_sl.cpp
index 9755f74e1..f0b130952 100644
--- a/src/saveload/misc_sl.cpp
+++ b/src/saveload/misc_sl.cpp
@@ -152,5 +152,5 @@ static void SaveLoad_VIEW()
extern const ChunkHandler _misc_chunk_handlers[] = {
{ 'DATE', SaveLoad_DATE, SaveLoad_DATE, nullptr, Check_DATE, CH_RIFF},
- { 'VIEW', SaveLoad_VIEW, SaveLoad_VIEW, nullptr, nullptr, CH_RIFF | CH_LAST},
+ { 'VIEW', SaveLoad_VIEW, SaveLoad_VIEW, nullptr, nullptr, CH_RIFF | CH_LAST},
};
diff --git a/src/saveload/object_sl.cpp b/src/saveload/object_sl.cpp
index 2ec996664..7d7f2fde9 100644
--- a/src/saveload/object_sl.cpp
+++ b/src/saveload/object_sl.cpp
@@ -74,6 +74,6 @@ static void Load_OBID()
}
extern const ChunkHandler _object_chunk_handlers[] = {
- { 'OBID', Save_OBID, Load_OBID, nullptr, nullptr, CH_ARRAY },
+ { 'OBID', Save_OBID, Load_OBID, nullptr, nullptr, CH_ARRAY },
{ 'OBJS', Save_OBJS, Load_OBJS, Ptrs_OBJS, nullptr, CH_ARRAY | CH_LAST},
};
diff --git a/src/saveload/oldloader.h b/src/saveload/oldloader.h
index a2953196b..12d8a348e 100644
--- a/src/saveload/oldloader.h
+++ b/src/saveload/oldloader.h
@@ -125,12 +125,12 @@ static inline uint32 ReadUint32(LoadgameState *ls)
* - OCL_CHUNK: load another proc to load a part of the savegame, 'amount' times
* - OCL_ASSERT: to check if we are really at the place we expect to be.. because old savegames are too binary to be sure ;)
*/
-#define OCL_SVAR(type, base, offset) { type, 1, nullptr, (uint)cpp_offsetof(base, offset), nullptr }
+#define OCL_SVAR(type, base, offset) { type, 1, nullptr, (uint)cpp_offsetof(base, offset), nullptr }
#define OCL_VAR(type, amount, pointer) { type, amount, pointer, 0, nullptr }
-#define OCL_END() { OC_END, 0, nullptr, 0, nullptr }
-#define OCL_CNULL(type, amount) { OC_NULL | type, amount, nullptr, 0, nullptr }
-#define OCL_CCHUNK(type, amount, proc) { OC_CHUNK | type, amount, nullptr, 0, proc }
-#define OCL_ASSERT(type, size) { OC_ASSERT | type, 1, nullptr, size, nullptr }
+#define OCL_END() { OC_END, 0, nullptr, 0, nullptr }
+#define OCL_CNULL(type, amount) { OC_NULL | type, amount, nullptr, 0, nullptr }
+#define OCL_CCHUNK(type, amount, proc) { OC_CHUNK | type, amount, nullptr, 0, proc }
+#define OCL_ASSERT(type, size) { OC_ASSERT | type, 1, nullptr, size, nullptr }
#define OCL_NULL(amount) OCL_CNULL((OldChunkType)0, amount)
#define OCL_CHUNK(amount, proc) OCL_CCHUNK((OldChunkType)0, amount, proc)
diff --git a/src/saveload/saveload.cpp b/src/saveload/saveload.cpp
index bab1e894f..d7ec59d6f 100644
--- a/src/saveload/saveload.cpp
+++ b/src/saveload/saveload.cpp
@@ -2296,7 +2296,7 @@ static const SaveLoadFormat _saveload_formats[] = {
/* Roughly 75% larger than zlib level 6 at only ~7% of the CPU usage. */
{"lzo", TO_BE32X('OTTD'), CreateLoadFilter<LZOLoadFilter>, CreateSaveFilter<LZOSaveFilter>, 0, 0, 0},
#else
- {"lzo", TO_BE32X('OTTD'), nullptr, nullptr, 0, 0, 0},
+ {"lzo", TO_BE32X('OTTD'), nullptr, nullptr, 0, 0, 0},
#endif
/* Roughly 5 times larger at only 1% of the CPU usage over zlib level 6. */
{"none", TO_BE32X('OTTN'), CreateLoadFilter<NoCompLoadFilter>, CreateSaveFilter<NoCompSaveFilter>, 0, 0, 0},
@@ -2306,7 +2306,7 @@ static const SaveLoadFormat _saveload_formats[] = {
* 1 is "only" 3 times as fast. Level 0 results in uncompressed savegames at about 8 times the cost of "none". */
{"zlib", TO_BE32X('OTTZ'), CreateLoadFilter<ZlibLoadFilter>, CreateSaveFilter<ZlibSaveFilter>, 0, 6, 9},
#else
- {"zlib", TO_BE32X('OTTZ'), nullptr, nullptr, 0, 0, 0},
+ {"zlib", TO_BE32X('OTTZ'), nullptr, nullptr, 0, 0, 0},
#endif
#if defined(WITH_LIBLZMA)
/* Level 2 compression is speed wise as fast as zlib level 6 compression (old default), but results in ~10% smaller saves.
@@ -2316,7 +2316,7 @@ static const SaveLoadFormat _saveload_formats[] = {
* It's OTTX and not e.g. OTTL because liblzma is part of xz-utils and .tar.xz is preferred over .tar.lzma. */
{"lzma", TO_BE32X('OTTX'), CreateLoadFilter<LZMALoadFilter>, CreateSaveFilter<LZMASaveFilter>, 0, 2, 9},
#else
- {"lzma", TO_BE32X('OTTX'), nullptr, nullptr, 0, 0, 0},
+ {"lzma", TO_BE32X('OTTX'), nullptr, nullptr, 0, 0, 0},
#endif
};
diff --git a/src/saveload/station_sl.cpp b/src/saveload/station_sl.cpp
index 40b5fb0e9..5e94de1a2 100644
--- a/src/saveload/station_sl.cpp
+++ b/src/saveload/station_sl.cpp
@@ -638,7 +638,7 @@ static void Ptrs_ROADSTOP()
}
extern const ChunkHandler _station_chunk_handlers[] = {
- { 'STNS', nullptr, Load_STNS, Ptrs_STNS, nullptr, CH_ARRAY },
+ { 'STNS', nullptr, Load_STNS, Ptrs_STNS, nullptr, CH_ARRAY },
{ 'STNN', Save_STNN, Load_STNN, Ptrs_STNN, nullptr, CH_ARRAY },
{ 'ROAD', Save_ROADSTOP, Load_ROADSTOP, Ptrs_ROADSTOP, nullptr, CH_ARRAY | CH_LAST},
};
diff --git a/src/saveload/story_sl.cpp b/src/saveload/story_sl.cpp
index 8cca9aed7..11aba1347 100644
--- a/src/saveload/story_sl.cpp
+++ b/src/saveload/story_sl.cpp
@@ -103,5 +103,5 @@ static void Load_STORY_PAGE()
extern const ChunkHandler _story_page_chunk_handlers[] = {
{ 'STPE', Save_STORY_PAGE_ELEMENT, Load_STORY_PAGE_ELEMENT, nullptr, nullptr, CH_ARRAY},
- { 'STPA', Save_STORY_PAGE, Load_STORY_PAGE, nullptr, nullptr, CH_ARRAY | CH_LAST},
+ { 'STPA', Save_STORY_PAGE, Load_STORY_PAGE, nullptr, nullptr, CH_ARRAY | CH_LAST},
};
diff --git a/src/saveload/town_sl.cpp b/src/saveload/town_sl.cpp
index c85bb4a82..771feadd8 100644
--- a/src/saveload/town_sl.cpp
+++ b/src/saveload/town_sl.cpp
@@ -321,6 +321,6 @@ static void Ptrs_TOWN()
/** Chunk handler for towns. */
extern const ChunkHandler _town_chunk_handlers[] = {
- { 'HIDS', Save_HIDS, Load_HIDS, nullptr, nullptr, CH_ARRAY },
+ { 'HIDS', Save_HIDS, Load_HIDS, nullptr, nullptr, CH_ARRAY },
{ 'CITY', Save_TOWN, Load_TOWN, Ptrs_TOWN, nullptr, CH_ARRAY | CH_LAST},
};
diff --git a/src/strgen/strgen.cpp b/src/strgen/strgen.cpp
index a4c9da08e..c33e884af 100644
--- a/src/strgen/strgen.cpp
+++ b/src/strgen/strgen.cpp
@@ -418,7 +418,7 @@ static const OptionData _opts[] = {
GETOPT_NOVAL( 't', "--todo"),
GETOPT_NOVAL( 'w', "--warning"),
GETOPT_NOVAL( 'h', "--help"),
- GETOPT_GENERAL('h', '?', nullptr, ODF_NO_VALUE),
+ GETOPT_GENERAL('h', '?', nullptr, ODF_NO_VALUE),
GETOPT_VALUE( 's', "--source_dir"),
GETOPT_VALUE( 'd', "--dest_dir"),
GETOPT_END(),