From 14385461faac5f04e013968b7ac67625e2a2705c Mon Sep 17 00:00:00 2001 From: Mathieu Schroeter Date: Sat, 11 Feb 2017 18:33:40 +0100 Subject: [PATCH] Fix a lot of warnings --- src/blupi.cpp | 2 +- src/event.cpp | 2 +- src/event.h | 2 +- src/misc.cpp | 2 +- src/misc.h | 2 +- src/movie.cpp | 6 +++--- src/movie.h | 6 +++--- src/pixmap.cpp | 4 ++-- src/pixmap.h | 4 ++-- src/sound.cpp | 2 +- src/sound.h | 2 +- 11 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/blupi.cpp b/src/blupi.cpp index c61b4bd..55fdeb7 100644 --- a/src/blupi.cpp +++ b/src/blupi.cpp @@ -389,7 +389,7 @@ void WindowProc2 (const SDL_Event &event) // Erreur dans DoInit. -bool InitFail(char *msg, bool bDirectX) +static bool InitFail(const char *msg, bool bDirectX) { char buffer[100]; diff --git a/src/event.cpp b/src/event.cpp index 7077477..ac32800 100644 --- a/src/event.cpp +++ b/src/event.cpp @@ -3982,7 +3982,7 @@ bool CEvent::BuildUp(POINT pos) // Démarre un film non interractif. -bool CEvent::StartMovie(char *pFilename) +bool CEvent::StartMovie(const char *pFilename) { RECT rect; diff --git a/src/event.h b/src/event.h index e2cd660..57ed4d3 100644 --- a/src/event.h +++ b/src/event.h @@ -96,7 +96,7 @@ public: void DecorAutoShift(POINT pos); - bool StartMovie(char *pFilename); + bool StartMovie(const char *pFilename); void StopMovie(); bool IsMovie(); diff --git a/src/misc.cpp b/src/misc.cpp index a6fe87f..35befc2 100644 --- a/src/misc.cpp +++ b/src/misc.cpp @@ -19,7 +19,7 @@ extern int g_mouseType; // Affiche un message de debug. -void OutputDebug(char *pMessage) +void OutputDebug(const char *pMessage) { SDL_LogDebug (SDL_LOG_CATEGORY_APPLICATION, "%s", pMessage); } diff --git a/src/misc.h b/src/misc.h index 359f114..1871a90 100644 --- a/src/misc.h +++ b/src/misc.h @@ -6,7 +6,7 @@ #include #include "blupi.h" -extern void OutputDebug(char *pMessage); +extern void OutputDebug(const char *pMessage); extern POINT ConvLongToPos(LPARAM lParam); diff --git a/src/movie.cpp b/src/movie.cpp index 547b774..191f1a5 100644 --- a/src/movie.cpp +++ b/src/movie.cpp @@ -77,7 +77,7 @@ void CMovie::fileCloseMovie() // the movie paused when opened. // Sets on success. -bool CMovie::fileOpenMovie(RECT rect, char *pFilename) +bool CMovie::fileOpenMovie(RECT rect, const char *pFilename) { std::string path = GetBaseDir (); path += pFilename; @@ -193,7 +193,7 @@ bool CMovie::GetEnable() // Indique si un film existe. -bool CMovie::IsExist(char *pFilename) +bool CMovie::IsExist(const char *pFilename) { std::string path = GetBaseDir (); FILE* file; @@ -209,7 +209,7 @@ bool CMovie::IsExist(char *pFilename) // Montre un film avi. -bool CMovie::Play(RECT rect, char *pFilename) +bool CMovie::Play(RECT rect, const char *pFilename) { if ( !m_bEnable ) return false; if ( !fileOpenMovie(rect, pFilename) ) return false; diff --git a/src/movie.h b/src/movie.h index e89cd31..a95e133 100644 --- a/src/movie.h +++ b/src/movie.h @@ -18,8 +18,8 @@ public: bool Create(); bool GetEnable(); - bool IsExist(char *pFilename); - bool Play(RECT rect, char *pFilename); + bool IsExist(const char *pFilename); + bool Play(RECT rect, const char *pFilename); void Stop(); void Pause (); void Resume (); @@ -27,7 +27,7 @@ public: protected: void playMovie(); - bool fileOpenMovie(RECT rect, char *pFilename); + bool fileOpenMovie(RECT rect, const char *pFilename); void fileCloseMovie(); void termAVI(); bool initAVI(); diff --git a/src/pixmap.cpp b/src/pixmap.cpp index bc849d1..cea29a8 100644 --- a/src/pixmap.cpp +++ b/src/pixmap.cpp @@ -187,7 +187,7 @@ int CPixmap::BltFast(SDL_Texture *lpSDL, int channel, POINT dst, RECT rcRect) // Cache une image contenant des ic�nes. -bool CPixmap::Cache(int channel, char *pFilename, POINT totalDim, POINT iconDim) +bool CPixmap::Cache(int channel, const char *pFilename, POINT totalDim, POINT iconDim) { if ( channel < 0 || channel >= MAXIMAGE ) return false; @@ -244,7 +244,7 @@ bool CPixmap::Cache(int channel, char *pFilename, POINT totalDim, POINT iconDim) // Cache une image globale. -bool CPixmap::Cache(int channel, char *pFilename, POINT totalDim) +bool CPixmap::Cache(int channel, const char *pFilename, POINT totalDim) { POINT iconDim; diff --git a/src/pixmap.h b/src/pixmap.h index d68d64a..a4c0d31 100644 --- a/src/pixmap.h +++ b/src/pixmap.h @@ -19,8 +19,8 @@ public: bool Flush(); void Fill(RECT rect, COLORREF color); - bool Cache(int channel, char *pFilename, POINT totalDim, POINT iconDim); - bool Cache(int channel, char *pFilename, POINT totalDim); + bool Cache(int channel, const char *pFilename, POINT totalDim, POINT iconDim); + bool Cache(int channel, const char *pFilename, POINT totalDim); bool Cache(int channel, SDL_Surface *surface, POINT totalDim); void SetClipping(RECT clip); RECT GetClipping(); diff --git a/src/sound.cpp b/src/sound.cpp index 0591ec8..c960d67 100644 --- a/src/sound.cpp +++ b/src/sound.cpp @@ -143,7 +143,7 @@ void CSound::CacheAll() // Charge un fichier son (.wav). -bool CSound::Cache(int channel, char *pFilename) +bool CSound::Cache(int channel, const char *pFilename) { if ( !m_bEnable ) return false; if ( channel < 0 || channel >= MAXSOUND ) return false; diff --git a/src/sound.h b/src/sound.h index efc7162..49ad56a 100644 --- a/src/sound.h +++ b/src/sound.h @@ -29,7 +29,7 @@ public: int GetMidiVolume(); void CacheAll(); - bool Cache(int channel, char *pFilename); + bool Cache(int channel, const char *pFilename); void Flush(int channel); bool Play(int channel, int volume=0, Uint8 panLeft = 255, Uint8 panRight = 255);