Skip to content

Commit d786508

Browse files
committed
Plugins (gforce): Add const to GForce::Print and GForce::Println
.. to fix compile error "no matching member function for call" with Clang on macOS.
1 parent 04ab908 commit d786508

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

libvisual-plugins/plugins/actor/G-Force/GForceCommon/G-Force.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1386,7 +1386,7 @@ void GForce::SpawnNewParticle() {
13861386

13871387

13881388

1389-
void GForce::Print( char* inStr ) {
1389+
void GForce::Print( const char* inStr ) {
13901390
long num = mConsoleLines.Count();
13911391
UtilStr* lastLine = mConsoleLines.Fetch( num );
13921392

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

14081408

1409-
void GForce::Println( char* inStr ) {
1409+
void GForce::Println( const char* inStr ) {
14101410
Print( inStr );
14111411

14121412
mConsoleLines.Add( "" );

libvisual-plugins/plugins/actor/G-Force/GForceCommon/Headers/G-Force.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -143,10 +143,10 @@ class GForce {
143143
long mConsoleLineDur;
144144
long mConsoleExpireTime;
145145
void DrawConsole();
146-
void Print( char* inStr );
147-
void Print( UtilStr* inStr ) { if ( inStr ) Print( inStr -> getCStr() ); }
148-
void Println( char* inStr );
149-
void Println( UtilStr* inStr ) { Println( inStr ? inStr -> getCStr() : 0 ); }
146+
void Print( const char* inStr );
147+
void Print( const UtilStr* inStr ) { if ( inStr ) Print( inStr -> getCStr() ); }
148+
void Println( const char* inStr );
149+
void Println( const UtilStr* inStr ) { Println( inStr ? inStr -> getCStr() : 0 ); }
150150

151151
// Palette stuff
152152
PixPalEntry mPalette[ 256 ];

0 commit comments

Comments
 (0)