Skip to content

Commit

Permalink
Plugins (gforce): Add const to GForce::Print and GForce::Println
Browse files Browse the repository at this point in the history
.. to fix compile error "no matching member function for call"
with Clang on macOS.
  • Loading branch information
hartwork committed Feb 22, 2023
1 parent 04ab908 commit d786508
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1386,7 +1386,7 @@ void GForce::SpawnNewParticle() {



void GForce::Print( char* inStr ) {
void GForce::Print( const char* inStr ) {
long num = mConsoleLines.Count();
UtilStr* lastLine = mConsoleLines.Fetch( num );

Expand All @@ -1406,7 +1406,7 @@ void GForce::Print( char* inStr ) {
}


void GForce::Println( char* inStr ) {
void GForce::Println( const char* inStr ) {
Print( inStr );

mConsoleLines.Add( "" );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,10 +143,10 @@ class GForce {
long mConsoleLineDur;
long mConsoleExpireTime;
void DrawConsole();
void Print( char* inStr );
void Print( UtilStr* inStr ) { if ( inStr ) Print( inStr -> getCStr() ); }
void Println( char* inStr );
void Println( UtilStr* inStr ) { Println( inStr ? inStr -> getCStr() : 0 ); }
void Print( const char* inStr );
void Print( const UtilStr* inStr ) { if ( inStr ) Print( inStr -> getCStr() ); }
void Println( const char* inStr );
void Println( const UtilStr* inStr ) { Println( inStr ? inStr -> getCStr() : 0 ); }

// Palette stuff
PixPalEntry mPalette[ 256 ];
Expand Down

0 comments on commit d786508

Please sign in to comment.