Permalink
Browse files

Remove unused variables + unsigned -> size_t

  • Loading branch information...
1 parent da260d4 commit 95d0edd543027c61349164b035c888928df51a53 @dimhotepus dimhotepus committed Mar 6, 2016
@@ -23,6 +23,7 @@
#include <istream>
#include <string.h>
#include <map>
+#include <stddef.h> // for size_t
#include <stdlib.h>
#include "language.hpp"
@@ -244,7 +245,7 @@ POParser::parse_header(const std::string& header)
if (has_prefix(line, "Content-Type:"))
{
// from_charset = line.substr(len);
- unsigned int len = strlen("Content-Type: text/plain; charset=");
+ size_t len = strlen("Content-Type: text/plain; charset=");
if (line.compare(0, len, "Content-Type: text/plain; charset=") == 0)
{
from_charset = line.substr(len);
@@ -99,13 +99,12 @@ AudioData LoadWavCodec(std::string filename)
return AudioData();
}
- //TODO find the position of "data"
- std::size_t dataOffset{audioFile.find("data", 36)};
+ //TODO: find the position of "data"
+ std::size_t dataOffset{audioFile.find("data", 36)};
if (dataOffset == std::string::npos) {
audioLogs.Warn("Could not find the data chunk in %s", filename);
return AudioData();
}
- std::string chunk2ID = audioFile.substr(dataOffset, 4);
int size = PackChars(audioFile, dataOffset + 4, 4);
@@ -472,8 +472,7 @@ void CL_ParseGamestate( msg_t *msg )
Com_Error( errorParm_t::ERR_DROP, "configstring > MAX_CONFIGSTRINGS" );
}
- const char* str = MSG_ReadBigString( msg );
- std::string s = str;
+ const char* str = MSG_ReadBigString( msg );
cl.gameState[i] = str;
}
else if ( cmd == svc_baseline )
@@ -957,7 +957,6 @@ void GLShaderManager::PrintShaderSource( Str::StringRef programName, GLuint obje
{
char *msg;
int maxLength = 0;
- std::string msgText;
glGetShaderiv( object, GL_SHADER_SOURCE_LENGTH, &maxLength );
@@ -631,7 +631,6 @@ char *CON_Input()
}
}
- std::u32string u32text;
switch ( mode )
{
case MODE_UNKNOWN:

0 comments on commit 95d0edd

Please sign in to comment.