More warnings being taken care of.

This commit is contained in:
Jason Felds
2011-03-14 17:03:02 -04:00
parent 801f05d297
commit 49f14d2b35
11 changed files with 43 additions and 23 deletions
+3 -4
View File
@@ -5,10 +5,9 @@
#include "RageTextureID.h" #include "RageTextureID.h"
#include "ActorUtil.h" #include "ActorUtil.h"
Character::Character() Character::Character(): m_sCharDir(""), m_sCharacterID(""),
{ m_sDisplayName(""), m_sCardPath(""), m_sIconPath(""),
m_iPreloadRefcount = 0; m_bUsableInRave(false), m_iPreloadRefcount(0) {}
}
bool Character::Load( RString sCharDir ) bool Character::Load( RString sCharDir )
{ {
+2
View File
@@ -25,6 +25,8 @@ private:
void CreateImpl(); void CreateImpl();
RString m_sGroup, m_sName; RString m_sGroup, m_sName;
ILocalizedStringImpl *m_pImpl; ILocalizedStringImpl *m_pImpl;
// Swallow up warnings. If they must be used, define them.
LocalizedString& operator=(const LocalizedString& rhs);
}; };
#endif #endif
+8 -2
View File
@@ -6,8 +6,11 @@
#include "RageFileBasic.h" #include "RageFileBasic.h"
struct lua_State; struct lua_State;
/* This is the high-level interface, which interfaces with RageFileObj implementations /**
* and RageFileManager. */ * @brief High-level file access.
*
* This is the high-level interface, which interfaces with RageFileObj
* implementations and RageFileManager. */
class RageFile: public RageFileBasic class RageFile: public RageFileBasic
{ {
public: public:
@@ -81,6 +84,9 @@ private:
RString m_Path; RString m_Path;
RString m_sError; RString m_sError;
int m_Mode; int m_Mode;
// Swallow up warnings. If they must be used, define them.
RageFile& operator=(const RageFile& rhs);
}; };
/** @brief Convenience wrappers for reading binary files. */ /** @brief Convenience wrappers for reading binary files. */
+3
View File
@@ -152,6 +152,9 @@ private:
* file, and no seeking is performed. */ * file, and no seeking is performed. */
bool m_bCRC32Enabled; bool m_bCRC32Enabled;
uint32_t m_iCRC32; uint32_t m_iCRC32;
// Swallow up warnings. If they must be used, define them.
RageFileObj& operator=(const RageFileObj& rhs);
}; };
#endif #endif
+2 -5
View File
@@ -44,11 +44,8 @@ RageSoundParams::RageSoundParams():
m_fPitch(1.0f), m_fSpeed(1.0f), m_StartTime( RageZeroTimer ), m_fPitch(1.0f), m_fSpeed(1.0f), m_StartTime( RageZeroTimer ),
StopMode(M_AUTO), m_bIsCriticalSound(false) {} StopMode(M_AUTO), m_bIsCriticalSound(false) {}
RageSoundLoadParams::RageSoundLoadParams() RageSoundLoadParams::RageSoundLoadParams():
{ m_bSupportRateChanging(false), m_bSupportPan(false) {}
m_bSupportRateChanging = false;
m_bSupportPan = false;
}
RageSound::RageSound(): RageSound::RageSound():
m_Mutex( "RageSound" ), m_pSource(NULL), m_iStreamFrame(0), m_Mutex( "RageSound" ), m_pSource(NULL), m_iStreamFrame(0),
+3
View File
@@ -53,6 +53,9 @@ private:
/* Prefs: */ /* Prefs: */
float m_fMixVolume; float m_fMixVolume;
float m_fVolumeOfNonCriticalSounds; float m_fVolumeOfNonCriticalSounds;
// Swallow up warnings. If they must be used, define them.
RageSoundManager& operator=(const RageSoundManager& rhs);
RageSoundManager(const RageSoundManager& rhs);
}; };
extern RageSoundManager *SOUNDMAN; extern RageSoundManager *SOUNDMAN;
+2
View File
@@ -29,6 +29,8 @@ private:
float m_fPitchRatio; float m_fPitchRatio;
float m_fLastSetSpeedRatio; float m_fLastSetSpeedRatio;
float m_fLastSetPitchRatio; float m_fLastSetPitchRatio;
// Swallow up warnings. If they must be used, define them.
RageSoundReader_PitchChange& operator=(const RageSoundReader_PitchChange& rhs);
}; };
#endif #endif
+2 -1
View File
@@ -53,7 +53,8 @@ private:
int iFramesBuffered; int iFramesBuffered;
int iPositionOfFirstFrame; int iPositionOfFirstFrame;
float fRate; float fRate;
Mapping() { iFramesBuffered = iPositionOfFirstFrame = 0; fRate = 1.0f; } Mapping(): iFramesBuffered(0), iPositionOfFirstFrame(0),
fRate(1.0f) {}
}; };
list<Mapping> m_StreamPosition; list<Mapping> m_StreamPosition;
+2 -1
View File
@@ -65,7 +65,8 @@ struct ThreadSlot
int m_iCurCheckpoint, m_iNumCheckpoints; int m_iCurCheckpoint, m_iNumCheckpoints;
const char *GetFormattedCheckpoint( int lineno ); const char *GetFormattedCheckpoint( int lineno );
ThreadSlot() { Init(); } ThreadSlot(): m_bUsed(false), m_iID(GetInvalidThreadId()),
m_pImpl(NULL), m_iCurCheckpoint(0), m_iNumCheckpoints(0) {}
void Init() void Init()
{ {
m_iID = GetInvalidThreadId(); m_iID = GetInvalidThreadId();
+3 -8
View File
@@ -127,16 +127,11 @@ public:
T& operator*() { return *m_pPtr; } T& operator*() { return *m_pPtr; }
T* operator->() { return m_pPtr; } T* operator->() { return m_pPtr; }
explicit HiddenPtr( T *p = NULL ) explicit HiddenPtr( T *p = NULL ): m_pPtr(p) {}
{
m_pPtr = p;
}
HiddenPtr( const HiddenPtr<T> &cpy ) HiddenPtr( const HiddenPtr<T> &cpy ): m_pPtr(NULL)
{ {
if( cpy.m_pPtr == NULL ) if( cpy.m_pPtr != NULL )
m_pPtr = NULL;
else
m_pPtr = HiddenPtrTraits<T>::Copy( cpy.m_pPtr ); m_pPtr = HiddenPtrTraits<T>::Copy( cpy.m_pPtr );
} }
+13 -2
View File
@@ -46,8 +46,19 @@ public:
}; };
SoundEffectType m_SoundEffectType; SoundEffectType m_SoundEffectType;
/**
SongOptions() { Init(); }; * @brief Set up the SongOptions with reasonable defaults.
*
* This is taken from Init(), but uses the intended
* initialization lists. */
SongOptions(): m_LifeType(LIFE_BAR), m_DrainType(DRAIN_NORMAL),
m_iBatteryLives(4), m_bAssistClap(false),
m_bAssistMetronome(false), m_fMusicRate(1.0f),
m_SpeedfMusicRate(1.0f), m_fHaste(0.0f),
m_SpeedfHaste(1.0f), m_AutosyncType(AUTOSYNC_OFF),
m_SoundEffectType(SOUNDEFFECT_OFF),
m_bStaticBackground(false), m_bRandomBGOnly(false),
m_bSaveScore(true), m_bSaveReplay(false) {};
void Init(); void Init();
void Approach( const SongOptions& other, float fDeltaSeconds ); void Approach( const SongOptions& other, float fDeltaSeconds );
void GetMods( vector<RString> &AddTo ) const; void GetMods( vector<RString> &AddTo ) const;