From 2bb46b6aa3997bbfa79eca3e31b9eee4d2b885d4 Mon Sep 17 00:00:00 2001 From: Sebastian Pipping Date: Tue, 7 Feb 2023 00:30:26 +0100 Subject: [PATCH] Plugins (gforce): Add const to GForce::Print and GForce::Println .. to fix compile error "no matching member function for call" with Clang on macOS. --- .../plugins/actor/G-Force/GForceCommon/G-Force.cpp | 4 ++-- .../plugins/actor/G-Force/GForceCommon/Headers/G-Force.h | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/libvisual-plugins/plugins/actor/G-Force/GForceCommon/G-Force.cpp b/libvisual-plugins/plugins/actor/G-Force/GForceCommon/G-Force.cpp index bce37c8dd..ac374caeb 100644 --- a/libvisual-plugins/plugins/actor/G-Force/GForceCommon/G-Force.cpp +++ b/libvisual-plugins/plugins/actor/G-Force/GForceCommon/G-Force.cpp @@ -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 ); @@ -1406,7 +1406,7 @@ void GForce::Print( char* inStr ) { } -void GForce::Println( char* inStr ) { +void GForce::Println( const char* inStr ) { Print( inStr ); mConsoleLines.Add( "" ); diff --git a/libvisual-plugins/plugins/actor/G-Force/GForceCommon/Headers/G-Force.h b/libvisual-plugins/plugins/actor/G-Force/GForceCommon/Headers/G-Force.h index 7ca8ed028..b518cb961 100644 --- a/libvisual-plugins/plugins/actor/G-Force/GForceCommon/Headers/G-Force.h +++ b/libvisual-plugins/plugins/actor/G-Force/GForceCommon/Headers/G-Force.h @@ -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 ];