- more cppcheck code cleanup

This commit is contained in:
Mark Vejvoda 2012-11-06 03:52:27 +00:00
parent 5bcc15a7fc
commit 29da478bd5
5 changed files with 16 additions and 5 deletions

View File

@ -388,14 +388,14 @@ void ChatManager::appendText(const wchar_t *addText, bool validateChars, bool ad
} }
else if (key < 0x800) { else if (key < 0x800) {
buf[0] = (0xC0 | key >> 6); buf[0] = (0xC0 | key >> 6);
buf[1] = (0x80 | key & 0x3F); buf[1] = (0x80 | (key & 0x3F));
textCharLength.push_back(2); textCharLength.push_back(2);
//printf("2 char, textCharLength = %d\n",textCharLength.size()); //printf("2 char, textCharLength = %d\n",textCharLength.size());
} }
else { else {
buf[0] = (0xE0 | key >> 12); buf[0] = (0xE0 | key >> 12);
buf[1] = (0x80 | key >> 6 & 0x3F); buf[1] = (0x80 | (key >> 6 & 0x3F));
buf[2] = (0x80 | key & 0x3F); buf[2] = (0x80 | (key & 0x3F));
textCharLength.push_back(3); textCharLength.push_back(3);
//printf("3 char, textCharLength = %d\n",textCharLength.size()); //printf("3 char, textCharLength = %d\n",textCharLength.size());
} }

View File

@ -658,6 +658,8 @@ namespace rapidxml
: m_name(0) : m_name(0)
, m_value(0) , m_value(0)
, m_parent(0) , m_parent(0)
, m_name_size(0)
, m_value_size(0)
{ {
} }
@ -807,7 +809,7 @@ namespace rapidxml
//! Constructs an empty attribute with the specified type. //! Constructs an empty attribute with the specified type.
//! Consider using memory_pool of appropriate xml_document if allocating attributes manually. //! Consider using memory_pool of appropriate xml_document if allocating attributes manually.
xml_attribute() xml_attribute() : m_next_attribute(0), m_prev_attribute(0)
{ {
} }
@ -902,6 +904,10 @@ namespace rapidxml
: m_type(type) : m_type(type)
, m_first_node(0) , m_first_node(0)
, m_first_attribute(0) , m_first_attribute(0)
, m_last_attribute(0)
, m_last_node(0)
, m_next_sibling(0)
, m_prev_sibling(0)
{ {
} }
@ -1849,7 +1855,7 @@ namespace rapidxml
// Other character, skip it // Other character, skip it
default: default:
++text; ++text;
break;
} }
} }

View File

@ -73,6 +73,7 @@ namespace rapidxml
break; break;
default: default:
*out++ = *begin; // No expansion, copy character *out++ = *begin; // No expansion, copy character
break;
} }
} }
++begin; // Step to next character ++begin; // Step to next character

View File

@ -28,6 +28,8 @@ namespace Shared{ namespace Graphics{ namespace D3d9{
ContextD3d9::ContextD3d9(){ ContextD3d9::ContextD3d9(){
windowed= true; windowed= true;
hardware= true; hardware= true;
d3dObject=NULL;
d3dDevice=NULL;
} }
void ContextD3d9::init(){ void ContextD3d9::init(){

View File

@ -29,6 +29,8 @@ ShaderProgramD3d9::ShaderProgramD3d9(){
d3dDevice= static_cast<ContextD3d9*>(gi.getCurrentContext())->getD3dDevice(); d3dDevice= static_cast<ContextD3d9*>(gi.getCurrentContext())->getD3dDevice();
vertexShader= NULL; vertexShader= NULL;
pixelShader= NULL; pixelShader= NULL;
d3dVsConstantTable=NULL;
d3dPsConstantTable=NULL;
} }
void ShaderProgramD3d9::attach(VertexShader *vs, FragmentShader *fs){ void ShaderProgramD3d9::attach(VertexShader *vs, FragmentShader *fs){