Skip to content

Commit 7098e3b

Browse files
committed
[GEN][ZH] Remove trailing LF from DEBUG_ASSERTCRASH strings with script (#1232)
1 parent 37eab16 commit 7098e3b

File tree

268 files changed

+889
-889
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

268 files changed

+889
-889
lines changed

Core/GameEngine/Source/Common/System/Xfer.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -562,7 +562,7 @@ void Xfer::xferScienceType( ScienceType *science )
562562
{
563563

564564
// sanity
565-
DEBUG_ASSERTCRASH( science != NULL, ("xferScienceType - Invalid parameters\n") );
565+
DEBUG_ASSERTCRASH( science != NULL, ("xferScienceType - Invalid parameters") );
566566

567567
AsciiString scienceName;
568568

@@ -611,7 +611,7 @@ void Xfer::xferScienceVec( ScienceVec *scienceVec )
611611
{
612612

613613
// sanity
614-
DEBUG_ASSERTCRASH( scienceVec != NULL, ("xferScienceVec - Invalid parameters\n") );
614+
DEBUG_ASSERTCRASH( scienceVec != NULL, ("xferScienceVec - Invalid parameters") );
615615

616616
// this deserves a version number
617617
const XferVersion currentVersion = 1;

Core/GameEngine/Source/Common/System/XferCRC.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ void XferDeepCRC::xferImplementation( void *data, Int dataSize )
282282
}
283283

284284
// sanity
285-
DEBUG_ASSERTCRASH( m_fileFP != NULL, ("XferSave - file pointer for '%s' is NULL\n",
285+
DEBUG_ASSERTCRASH( m_fileFP != NULL, ("XferSave - file pointer for '%s' is NULL",
286286
m_identifier.str()) );
287287

288288
// write data to file

Core/GameEngine/Source/Common/System/XferLoad.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ Int XferLoad::beginBlock( void )
122122
{
123123

124124
// sanity
125-
DEBUG_ASSERTCRASH( m_fileFP != NULL, ("Xfer begin block - file pointer for '%s' is NULL\n",
125+
DEBUG_ASSERTCRASH( m_fileFP != NULL, ("Xfer begin block - file pointer for '%s' is NULL",
126126
m_identifier.str()) );
127127

128128
// read block size
@@ -155,11 +155,11 @@ void XferLoad::skip( Int dataSize )
155155
{
156156

157157
// sanity
158-
DEBUG_ASSERTCRASH( m_fileFP != NULL, ("XferLoad::skip - file pointer for '%s' is NULL\n",
158+
DEBUG_ASSERTCRASH( m_fileFP != NULL, ("XferLoad::skip - file pointer for '%s' is NULL",
159159
m_identifier.str()) );
160160

161161
// sanity
162-
DEBUG_ASSERTCRASH( dataSize >=0, ("XferLoad::skip - dataSize '%d' must be greater than 0\n",
162+
DEBUG_ASSERTCRASH( dataSize >=0, ("XferLoad::skip - dataSize '%d' must be greater than 0",
163163
dataSize) );
164164

165165
// skip datasize in the file from the current position
@@ -244,7 +244,7 @@ void XferLoad::xferImplementation( void *data, Int dataSize )
244244
{
245245

246246
// sanity
247-
DEBUG_ASSERTCRASH( m_fileFP != NULL, ("XferLoad - file pointer for '%s' is NULL\n",
247+
DEBUG_ASSERTCRASH( m_fileFP != NULL, ("XferLoad - file pointer for '%s' is NULL",
248248
m_identifier.str()) );
249249

250250
// read data from file

Core/GameEngine/Source/Common/System/XferSave.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ Int XferSave::beginBlock( void )
166166
{
167167

168168
// sanity
169-
DEBUG_ASSERTCRASH( m_fileFP != NULL, ("Xfer begin block - file pointer for '%s' is NULL\n",
169+
DEBUG_ASSERTCRASH( m_fileFP != NULL, ("Xfer begin block - file pointer for '%s' is NULL",
170170
m_identifier.str()) );
171171

172172
// get the current file position so we can back up here for the next end block call
@@ -211,7 +211,7 @@ void XferSave::endBlock( void )
211211
{
212212

213213
// sanity
214-
DEBUG_ASSERTCRASH( m_fileFP != NULL, ("Xfer end block - file pointer for '%s' is NULL\n",
214+
DEBUG_ASSERTCRASH( m_fileFP != NULL, ("Xfer end block - file pointer for '%s' is NULL",
215215
m_identifier.str()) );
216216

217217
// sanity, make sure we have a block started
@@ -258,7 +258,7 @@ void XferSave::skip( Int dataSize )
258258
{
259259

260260
// sanity
261-
DEBUG_ASSERTCRASH( m_fileFP != NULL, ("XferSave - file pointer for '%s' is NULL\n",
261+
DEBUG_ASSERTCRASH( m_fileFP != NULL, ("XferSave - file pointer for '%s' is NULL",
262262
m_identifier.str()) );
263263

264264

@@ -343,7 +343,7 @@ void XferSave::xferImplementation( void *data, Int dataSize )
343343
{
344344

345345
// sanity
346-
DEBUG_ASSERTCRASH( m_fileFP != NULL, ("XferSave - file pointer for '%s' is NULL\n",
346+
DEBUG_ASSERTCRASH( m_fileFP != NULL, ("XferSave - file pointer for '%s' is NULL",
347347
m_identifier.str()) );
348348

349349
// write data to file

Core/Libraries/Source/Compression/CompressionManager.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -421,10 +421,10 @@ void DoCompressTest( void )
421421
}
422422
d.compressedSize[i] = compressedLen;
423423
DEBUG_LOG(("Compressed len is %d (%g%% of original size)", compressedLen, (double)compressedLen/(double)origSize*100.0));
424-
DEBUG_ASSERTCRASH(compressedLen, ("Failed to compress\n"));
424+
DEBUG_ASSERTCRASH(compressedLen, ("Failed to compress"));
425425
DEBUG_LOG(("Decompressed len is %d (%g%% of original size)", decompressedLen, (double)decompressedLen/(double)origSize*100.0));
426426

427-
DEBUG_ASSERTCRASH(decompressedLen == origSize, ("orig size does not match compressed+uncompressed output\n"));
427+
DEBUG_ASSERTCRASH(decompressedLen == origSize, ("orig size does not match compressed+uncompressed output"));
428428
if (decompressedLen == origSize)
429429
{
430430
Int ret = memcmp(buf, uncompressedBuf, origSize);

Core/Tools/ImagePacker/Source/ImagePacker.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ TexturePage *ImagePacker::createNewTexturePage( void )
8383
if( page == NULL )
8484
{
8585

86-
DEBUG_ASSERTCRASH( page, ("Unable to allocate new texture page.\n") );
86+
DEBUG_ASSERTCRASH( page, ("Unable to allocate new texture page.") );
8787
return NULL;
8888

8989
} // end if
@@ -1154,7 +1154,7 @@ Bool ImagePacker::init( void )
11541154
if( m_targa == NULL )
11551155
{
11561156

1157-
DEBUG_ASSERTCRASH( m_targa, ("Unable to allocate targa header during init\n") );
1157+
DEBUG_ASSERTCRASH( m_targa, ("Unable to allocate targa header during init") );
11581158
MessageBox( NULL, "ImagePacker can't init, unable to create targa",
11591159
"Internal Error", MB_OK | MB_ICONERROR );
11601160
return FALSE;

Core/Tools/ImagePacker/Source/TexturePage.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -532,7 +532,7 @@ Bool TexturePage::addImageData( Byte *destBuffer,
532532

533533
// get the source image buffer
534534
char *sourceBuffer = source.GetImage();
535-
DEBUG_ASSERTCRASH( sourceBuffer, ("No Source buffer for source image\n") );
535+
DEBUG_ASSERTCRASH( sourceBuffer, ("No Source buffer for source image") );
536536

537537
// get the source bytes per pixel
538538
Int sourceBPP = TGA_BytesPerPixel( source.Header.PixelDepth );
@@ -863,7 +863,7 @@ TexturePage::TexturePage( Int width, Int height )
863863
// create a "canvas" to represent used and unused areas
864864
canvasSize = m_size.x * m_size.y;
865865
m_canvas = new UnsignedByte[ canvasSize ];
866-
DEBUG_ASSERTCRASH( m_canvas, ("Cannot allocate canvas for texture page\n") );
866+
DEBUG_ASSERTCRASH( m_canvas, ("Cannot allocate canvas for texture page") );
867867
memset( m_canvas, FREE, sizeof( UnsignedByte ) * canvasSize );
868868

869869
} // end TexturePage
@@ -899,7 +899,7 @@ Bool TexturePage::addImage( ImageInfo *image )
899899
if( image == NULL )
900900
{
901901

902-
DEBUG_ASSERTCRASH( image, ("TexturePage::addImage: NULL image!\n") );
902+
DEBUG_ASSERTCRASH( image, ("TexturePage::addImage: NULL image!") );
903903
return TRUE; // say it was added
904904

905905
} // end if
@@ -1181,8 +1181,8 @@ Bool TexturePage::generateTexture( void )
11811181
return FALSE;
11821182

11831183
// sanity
1184-
DEBUG_ASSERTCRASH( m_packedImage == NULL, ("The packed image list must be NULL before generating texture\n") );
1185-
DEBUG_ASSERTCRASH( m_targa == NULL, ("The targa must be NULL before generating a new texture\n") );
1184+
DEBUG_ASSERTCRASH( m_packedImage == NULL, ("The packed image list must be NULL before generating texture") );
1185+
DEBUG_ASSERTCRASH( m_targa == NULL, ("The targa must be NULL before generating a new texture") );
11861186

11871187
// allocate targa to help us generate the final texture
11881188
m_targa = new Targa;

Generals/Code/GameEngine/Include/Common/GameMemory.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -592,11 +592,11 @@ private: \
592592
order-of-execution problem for static variables, ensuring this is not executed \
593593
prior to the initialization of TheMemoryPoolFactory. \
594594
*/ \
595-
DEBUG_ASSERTCRASH(TheMemoryPoolFactory, ("TheMemoryPoolFactory is NULL\n")); \
595+
DEBUG_ASSERTCRASH(TheMemoryPoolFactory, ("TheMemoryPoolFactory is NULL")); \
596596
static MemoryPool *The##ARGCLASS##Pool = TheMemoryPoolFactory->findMemoryPool(ARGPOOLNAME); \
597-
DEBUG_ASSERTCRASH(The##ARGCLASS##Pool, ("Pool \"%s\" not found (did you set it up in initMemoryPools?)\n", ARGPOOLNAME)); \
598-
DEBUG_ASSERTCRASH(The##ARGCLASS##Pool->getAllocationSize() >= sizeof(ARGCLASS), ("Pool \"%s\" is too small for this class (currently %d, need %d)\n", ARGPOOLNAME, The##ARGCLASS##Pool->getAllocationSize(), sizeof(ARGCLASS))); \
599-
DEBUG_ASSERTCRASH(The##ARGCLASS##Pool->getAllocationSize() <= sizeof(ARGCLASS)+MEMORY_POOL_OBJECT_ALLOCATION_SLOP, ("Pool \"%s\" is too large for this class (currently %d, need %d)\n", ARGPOOLNAME, The##ARGCLASS##Pool->getAllocationSize(), sizeof(ARGCLASS))); \
597+
DEBUG_ASSERTCRASH(The##ARGCLASS##Pool, ("Pool \"%s\" not found (did you set it up in initMemoryPools?)", ARGPOOLNAME)); \
598+
DEBUG_ASSERTCRASH(The##ARGCLASS##Pool->getAllocationSize() >= sizeof(ARGCLASS), ("Pool \"%s\" is too small for this class (currently %d, need %d)", ARGPOOLNAME, The##ARGCLASS##Pool->getAllocationSize(), sizeof(ARGCLASS))); \
599+
DEBUG_ASSERTCRASH(The##ARGCLASS##Pool->getAllocationSize() <= sizeof(ARGCLASS)+MEMORY_POOL_OBJECT_ALLOCATION_SLOP, ("Pool \"%s\" is too large for this class (currently %d, need %d)", ARGPOOLNAME, The##ARGCLASS##Pool->getAllocationSize(), sizeof(ARGCLASS))); \
600600
return The##ARGCLASS##Pool; \
601601
}
602602

@@ -611,11 +611,11 @@ private: \
611611
order-of-execution problem for static variables, ensuring this is not executed \
612612
prior to the initialization of TheMemoryPoolFactory. \
613613
*/ \
614-
DEBUG_ASSERTCRASH(TheMemoryPoolFactory, ("TheMemoryPoolFactory is NULL\n")); \
614+
DEBUG_ASSERTCRASH(TheMemoryPoolFactory, ("TheMemoryPoolFactory is NULL")); \
615615
static MemoryPool *The##ARGCLASS##Pool = TheMemoryPoolFactory->createMemoryPool(ARGPOOLNAME, sizeof(ARGCLASS), ARGINITIAL, ARGOVERFLOW); \
616-
DEBUG_ASSERTCRASH(The##ARGCLASS##Pool, ("Pool \"%s\" not found (did you set it up in initMemoryPools?)\n", ARGPOOLNAME)); \
617-
DEBUG_ASSERTCRASH(The##ARGCLASS##Pool->getAllocationSize() >= sizeof(ARGCLASS), ("Pool \"%s\" is too small for this class (currently %d, need %d)\n", ARGPOOLNAME, The##ARGCLASS##Pool->getAllocationSize(), sizeof(ARGCLASS))); \
618-
DEBUG_ASSERTCRASH(The##ARGCLASS##Pool->getAllocationSize() <= sizeof(ARGCLASS)+MEMORY_POOL_OBJECT_ALLOCATION_SLOP, ("Pool \"%s\" is too large for this class (currently %d, need %d)\n", ARGPOOLNAME, The##ARGCLASS##Pool->getAllocationSize(), sizeof(ARGCLASS))); \
616+
DEBUG_ASSERTCRASH(The##ARGCLASS##Pool, ("Pool \"%s\" not found (did you set it up in initMemoryPools?)", ARGPOOLNAME)); \
617+
DEBUG_ASSERTCRASH(The##ARGCLASS##Pool->getAllocationSize() >= sizeof(ARGCLASS), ("Pool \"%s\" is too small for this class (currently %d, need %d)", ARGPOOLNAME, The##ARGCLASS##Pool->getAllocationSize(), sizeof(ARGCLASS))); \
618+
DEBUG_ASSERTCRASH(The##ARGCLASS##Pool->getAllocationSize() <= sizeof(ARGCLASS)+MEMORY_POOL_OBJECT_ALLOCATION_SLOP, ("Pool \"%s\" is too large for this class (currently %d, need %d)", ARGPOOLNAME, The##ARGCLASS##Pool->getAllocationSize(), sizeof(ARGCLASS))); \
619619
return The##ARGCLASS##Pool; \
620620
}
621621

Generals/Code/GameEngine/Include/Common/SparseMatchFinder.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ class SparseMatchFinder
234234

235235
const MATCHABLE* info = findBestInfoSlow(v, bits);
236236

237-
DEBUG_ASSERTCRASH(info != NULL, ("no suitable match for criteria was found!\n"));
237+
DEBUG_ASSERTCRASH(info != NULL, ("no suitable match for criteria was found!"));
238238
if (info != NULL) {
239239
m_bestMatches[bits] = info;
240240
}

Generals/Code/GameEngine/Include/GameLogic/Locomotor.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ class Locomotor : public MemoryPoolObject, public Snapshot
286286
inline void setMaxLift(Real lift) { m_maxLift = lift; }
287287
inline void setMaxSpeed(Real speed)
288288
{
289-
DEBUG_ASSERTCRASH(!(speed <= 0.0f && m_template->m_appearance == LOCO_THRUST), ("THRUST locos may not have zero speeds!\n"));
289+
DEBUG_ASSERTCRASH(!(speed <= 0.0f && m_template->m_appearance == LOCO_THRUST), ("THRUST locos may not have zero speeds!"));
290290
m_maxSpeed = speed;
291291
}
292292
inline void setMaxAcceleration(Real accel) { m_maxAccel = accel; }

0 commit comments

Comments
 (0)