Ignore any part of the file before src. gcc replaces __FILE__ with the name of the file as it was passed to it. Xcode invokes gcc with absolute paths. This makes crash logs slightly easier to read.

This commit is contained in:
Steve Checkoway
2006-01-16 07:39:04 +00:00
parent e06c1ce4e3
commit 2b60174182
+3 -1
View File
@@ -374,7 +374,9 @@ void Checkpoints::SetCheckpoint( const char *file, int line, const char *message
/* We can't ASSERT here, since that uses checkpoints. */
if( slot == NULL )
sm_crash( "GetUnknownThreadSlot() returned NULL" );
/* Ignore everything before the first "src/". */
file = strstr( file, "src/" ) ?: file;
slot->Checkpoints[slot->CurCheckpoint].Set( file, line, message );
if( g_LogCheckpoints )