Skip to content

Commit cdc5583

Browse files
committed
Fix warnings caused by constant char pointers
1 parent 80007ff commit cdc5583

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

include/soloud_c.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ int FFTFilter_setParametersEx(FFTFilter * aFFTFilter, int aShift, int aCombine /
190190
*/
191191
void Speech_destroy(Speech * aSpeech);
192192
Speech * Speech_create();
193-
int Speech_setText(Speech * aSpeech, char * aText);
193+
int Speech_setText(Speech * aSpeech, const char * aText);
194194
void Speech_setLooping(Speech * aSpeech, int aLoop);
195195
void Speech_setFilter(Speech * aSpeech, int aFilterId, Filter * aFilter);
196196
void Speech_stop(Speech * aSpeech);

include/soloud_speech.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ namespace SoLoud
3939
int mFrames;
4040
darray mElement;
4141
Speech();
42-
int setText(char *aText);
42+
int setText(const char *aText);
4343
virtual ~Speech();
4444
virtual AudioSourceInstance *createInstance();
4545
};
@@ -59,4 +59,4 @@ namespace SoLoud
5959
};
6060
};
6161

62-
#endif
62+
#endif

src/audiosource/speech/soloud_speech.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ namespace SoLoud
111111
return 0;
112112
}
113113

114-
int Speech::setText(char *aText)
114+
int Speech::setText(const char *aText)
115115
{
116116
if (aText == NULL)
117117
return INVALID_PARAMETER;

src/c_api/soloud_c.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -474,7 +474,7 @@ void * Speech_create()
474474
return (void *)new Speech;
475475
}
476476

477-
int Speech_setText(void * aClassPtr, char * aText)
477+
int Speech_setText(void * aClassPtr, const char * aText)
478478
{
479479
Speech * cl = (Speech *)aClassPtr;
480480
return cl->setText(aText);

0 commit comments

Comments
 (0)