- 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

@@ -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;
}
// =====================================================