Changeset - r23620:1030ace82d57
[Not reviewed]
master
0 14 0
peter1138 - 6 years ago 2019-04-13 19:18:31
peter1138@openttd.org
Cleanup: Fix alignment after NULL -> nullptr change.
14 files changed with 55 insertions and 55 deletions:
0 comments (0 inline, 0 general)
src/newgrf.cpp
Show inline comments
 
@@ -8945,27 +8945,27 @@ static void DecodeSpecialSprite(byte *bu
 
	 * 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);
src/saveload/economy_sl.cpp
Show inline comments
 
@@ -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},
 
};
src/saveload/engine_sl.cpp
Show inline comments
 
@@ -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 },
 
};
src/saveload/industry_sl.cpp
Show inline comments
 
@@ -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},
 
};
src/saveload/linkgraph_sl.cpp
Show inline comments
 
@@ -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  }
 
};
src/saveload/map_sl.cpp
Show inline comments
 
@@ -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 },
 
};
src/saveload/misc_sl.cpp
Show inline comments
 
@@ -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},
 
};
src/saveload/object_sl.cpp
Show inline comments
 
@@ -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},
 
};
src/saveload/oldloader.h
Show inline comments
 
@@ -125,12 +125,12 @@ static inline uint32 ReadUint32(Loadgame
 
 *  - 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)
 

	
src/saveload/saveload.cpp
Show inline comments
 
@@ -2296,7 +2296,7 @@ static const SaveLoadFormat _saveload_fo
 
	/* 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_fo
 
	 * 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_fo
 
	 * 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
 
};
 

	
src/saveload/station_sl.cpp
Show inline comments
 
@@ -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},
 
};
src/saveload/story_sl.cpp
Show inline comments
 
@@ -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},
 
};
src/saveload/town_sl.cpp
Show inline comments
 
@@ -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},
 
};
src/strgen/strgen.cpp
Show inline comments
 
@@ -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(),
0 comments (0 inline, 0 general)