More warning reductions, even if not noticed.

We're in the lower 40Ks now with Effective C++
Violations being checked.
This commit is contained in:
Jason Felds
2011-03-14 12:15:33 -04:00
parent d03e6a89fb
commit c5fda59080
7 changed files with 38 additions and 45 deletions
+9 -11
View File
@@ -32,7 +32,10 @@ struct Attack
bGlobal = false;
bShowInAttackList = true;
}
Attack() { MakeBlank(); }
Attack(): level(ATTACK_LEVEL_1), fStartSecond(-1),
fSecsRemaining(0), sModifiers(RString()),
bOn(false), bGlobal(false), bShowInAttackList(true)
{} // MakeBlank() is effectively called here.
Attack(
AttackLevel level_,
float fStartSecond_,
@@ -40,16 +43,11 @@ struct Attack
RString sModifiers_,
bool bOn_,
bool bGlobal_,
bool bShowInAttackList_ = true )
{
level = level_;
fStartSecond = fStartSecond_;
fSecsRemaining = fSecsRemaining_;
sModifiers = sModifiers_;
bOn = bOn_;
bGlobal = bGlobal_;
bShowInAttackList = bShowInAttackList_;
}
bool bShowInAttackList_ = true ):
level(level_), fStartSecond(fStartSecond_),
fSecsRemaining(fSecsRemaining_), sModifiers(sModifiers_),
bOn(bOn_), bGlobal(bGlobal_),
bShowInAttackList(bShowInAttackList_) {}
void GetAttackBeats( const Song *pSong, float &fStartBeat, float &fEndBeat ) const;
void GetRealtimeAttackBeats( const Song *pSong, const PlayerState* pPlayerState, float &fStartBeat, float &fEndBeat ) const;
+3 -6
View File
@@ -66,12 +66,9 @@ private:
RageTexture* pTexture_,
float fDelaySecs_,
RageVector2 vTranslate_
)
{
pTexture = pTexture_;
fDelaySecs = fDelaySecs_;
vTranslate = vTranslate_;
}
):
pTexture(pTexture_), fDelaySecs(fDelaySecs_),
vTranslate(vTranslate_) {}
RageTexture* pTexture;
float fDelaySecs;
+1 -1
View File
@@ -7,7 +7,7 @@
struct RageSurfaceColor
{
uint8_t r, g, b, a;
RageSurfaceColor() { }
RageSurfaceColor(): r(0), g(0), b(0), a(0) { }
RageSurfaceColor( uint8_t r_, uint8_t g_, uint8_t b_, uint8_t a_ ):
r(r_), g(g_), b(b_), a(a_) { }
+9 -2
View File
@@ -59,8 +59,15 @@ struct RageTextureID
void Init();
RageTextureID() { Init(); }
RageTextureID( const RString &fn ) { Init(); SetFilename(fn); }
RageTextureID(): filename(RString()), iMaxSize(0), bMipMaps(false),
iAlphaBits(0), iGrayscaleBits(0), iColorDepth(0),
bDither(false), bStretch(false), bHotPinkColorKey(false),
AdditionalTextureHints(RString()), Policy(TEX_DEFAULT) { Init(); }
RageTextureID( const RString &fn ): filename(RString()), iMaxSize(0),
bMipMaps(false), iAlphaBits(0), iGrayscaleBits(0),
iColorDepth(0), bDither(false), bStretch(false),
bHotPinkColorKey(false), AdditionalTextureHints(RString()),
Policy(TEX_DEFAULT) { Init(); SetFilename(fn); }
void SetFilename( const RString &fn );
};
+11 -18
View File
@@ -14,30 +14,23 @@ struct RageTextureManagerPrefs
bool m_bHighResolutionTextures;
bool m_bMipMaps;
RageTextureManagerPrefs()
{
m_bDelayedDelete = false;
m_iMovieColorDepth = 16;
m_iTextureColorDepth = 16;
m_iMaxTextureResolution = 1024;
m_bHighResolutionTextures = true;
m_bMipMaps = false;
}
RageTextureManagerPrefs(): m_iTextureColorDepth(16),
m_iMovieColorDepth(16), m_bDelayedDelete(false),
m_iMaxTextureResolution(1024),
m_bHighResolutionTextures(true), m_bMipMaps(false) {}
RageTextureManagerPrefs(
int iTextureColorDepth,
int iMovieColorDepth,
bool bDelayedDelete,
int iMaxTextureResolution,
bool bHighResolutionTextures,
bool bMipMaps )
{
m_bDelayedDelete = bDelayedDelete;
m_iMovieColorDepth = iMovieColorDepth;
m_iTextureColorDepth = iTextureColorDepth;
m_iMaxTextureResolution = iMaxTextureResolution;
m_bHighResolutionTextures = bHighResolutionTextures;
m_bMipMaps = bMipMaps;
}
bool bMipMaps ):
m_iTextureColorDepth(iTextureColorDepth),
m_iMovieColorDepth(iMovieColorDepth),
m_bDelayedDelete(bDelayedDelete),
m_iMaxTextureResolution(iMaxTextureResolution),
m_bHighResolutionTextures(bHighResolutionTextures),
m_bMipMaps(bMipMaps) {}
bool operator!=( const RageTextureManagerPrefs& rhs ) const
{
+2 -2
View File
@@ -290,8 +290,8 @@ class RageVColor
public:
uint8_t b,g,r,a; // specific ordering required by Direct3D
RageVColor() { }
RageVColor(const RageColor &rc) { *this = rc; }
RageVColor(): b(0), g(0), r(0), a(0) { }
RageVColor(const RageColor &rc): b(0), g(0), r(0), a(0) { *this = rc; }
RageVColor &operator= (const RageColor &rc)
{
r = FTOC(rc.r); g = FTOC(rc.g); b = FTOC(rc.b); a = FTOC(rc.a);
+3 -5
View File
@@ -17,7 +17,7 @@
RandomGen g_RandomNumberGenerator;
MersenneTwister::MersenneTwister( int iSeed )
MersenneTwister::MersenneTwister( int iSeed ) : m_iNext(0)
{
Reset( iSeed );
}
@@ -1315,15 +1315,13 @@ void Regex::Release()
m_sPattern = RString();
}
Regex::Regex( const RString &sStr )
Regex::Regex( const RString &sStr ): m_pReg(NULL), m_iBackrefs(0), m_sPattern(RString())
{
m_pReg = NULL;
Set( sStr );
}
Regex::Regex( const Regex &rhs )
Regex::Regex( const Regex &rhs ): m_pReg(NULL), m_iBackrefs(0), m_sPattern(RString())
{
m_pReg = NULL;
Set( rhs.m_sPattern );
}