- more cppcheck code cleanup

This commit is contained in:
Mark Vejvoda 2012-10-06 03:42:31 +00:00
parent 97ba1a27e2
commit 2a80dd7c3c
7 changed files with 25 additions and 3 deletions

View File

@ -357,6 +357,7 @@ AiRuleMassiveAttack::AiRuleMassiveAttack(Ai *ai):
AiRule(ai)
{
ultraAttack=false;
field = fLand;
}
bool AiRuleMassiveAttack::test(){

View File

@ -31,7 +31,9 @@ public:
Vec3f axis;
float angle;
AxisAngle(){};
AxisAngle() {
angle = 0.0f;
}
AxisAngle(const Vec3f &axis, float angle);
};
@ -43,7 +45,11 @@ class EulerAngles{
public:
float x, y, z;
EulerAngles(){};
EulerAngles() {
x = 0.0f;
y = 0.0f;
z = 0.0f;
}
EulerAngles(float x, float y, float z);
};

View File

@ -26,7 +26,9 @@ private:
SoundFactory *soundFactory;
private:
SoundInterface() {}
SoundInterface() {
soundFactory = 0;
}
SoundInterface(SoundInterface &);
void operator=(SoundInterface &);

View File

@ -26,6 +26,9 @@ namespace Shared{ namespace Graphics{ namespace Gl{
ShaderProgramGl::ShaderProgramGl(){
inited= false;
vertexShader=0;
fragmentShader=0;
handle=0;
}
void ShaderProgramGl::init(){
@ -173,6 +176,7 @@ GLint ShaderProgramGl::getLocation(const string &name){
ShaderGl::ShaderGl(){
inited= false;
handle = 0;
}
void ShaderGl::load(const string &path){

View File

@ -26,6 +26,9 @@ namespace Shared{ namespace Graphics{ namespace Gl{
ShaderProgramGl::ShaderProgramGl(){
inited= false;
vertexShader=0;
fragmentShader=0;
handle=0;
}
void ShaderProgramGl::init(){
@ -167,6 +170,7 @@ GLint ShaderProgramGl::getLocation(const string &name){
ShaderGl::ShaderGl(){
inited= false;
handle = 0;
}
void ShaderGl::load(const string &path){

View File

@ -136,6 +136,7 @@ ALenum SoundSource::getFormat(Sound* sound)
StaticSoundSource::StaticSoundSource() {
bufferAllocated = false;
buffer = 0;
}
StaticSoundSource::~StaticSoundSource() {
@ -179,6 +180,8 @@ void StaticSoundSource::play(StaticSound* sound) {
StreamSoundSource::StreamSoundSource()
{
sound = 0;
fadeState = NoFading;
format = 0;
alGenBuffers(STREAMFRAGMENTS, buffers);
SoundPlayerOpenAL::checkAlError(string(__FILE__) + string(" ") + string(__FUNCTION__) + string(" ") + intToStr(__LINE__));
}
@ -331,6 +334,7 @@ SoundPlayerOpenAL::SoundPlayerOpenAL() {
if(SystemFlags::getSystemSettingType(SystemFlags::debugSound).enabled) SystemFlags::OutputDebug(SystemFlags::debugSound,"In [%s::%s %d]\n",__FILE__,__FUNCTION__,__LINE__);
device = 0;
context = 0;
initOk = false;
if(SystemFlags::getSystemSettingType(SystemFlags::debugSound).enabled) SystemFlags::OutputDebug(SystemFlags::debugSound,"In [%s::%s %d]\n",__FILE__,__FUNCTION__,__LINE__);

View File

@ -40,6 +40,7 @@ SoundInfo::SoundInfo() {
Sound::Sound() {
volume= 0.0f;
fileName = "";
soundFileLoader = 0;
}
// =====================================================