Skip to content

Commit 95d0edd

Browse files
committed
Remove unused variables + unsigned -> size_t
1 parent da260d4 commit 95d0edd

File tree

5 files changed

+5
-8
lines changed

5 files changed

+5
-8
lines changed

daemon/libs/tinygettext/po_parser.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
#include <istream>
2424
#include <string.h>
2525
#include <map>
26+
#include <stddef.h> // for size_t
2627
#include <stdlib.h>
2728

2829
#include "language.hpp"
@@ -244,7 +245,7 @@ POParser::parse_header(const std::string& header)
244245
if (has_prefix(line, "Content-Type:"))
245246
{
246247
// from_charset = line.substr(len);
247-
unsigned int len = strlen("Content-Type: text/plain; charset=");
248+
size_t len = strlen("Content-Type: text/plain; charset=");
248249
if (line.compare(0, len, "Content-Type: text/plain; charset=") == 0)
249250
{
250251
from_charset = line.substr(len);

daemon/src/engine/audio/WavCodec.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,13 +99,12 @@ AudioData LoadWavCodec(std::string filename)
9999
return AudioData();
100100
}
101101

102-
//TODO find the position of "data"
103-
std::size_t dataOffset{audioFile.find("data", 36)};
102+
//TODO: find the position of "data"
103+
std::size_t dataOffset{audioFile.find("data", 36)};
104104
if (dataOffset == std::string::npos) {
105105
audioLogs.Warn("Could not find the data chunk in %s", filename);
106106
return AudioData();
107107
}
108-
std::string chunk2ID = audioFile.substr(dataOffset, 4);
109108

110109
int size = PackChars(audioFile, dataOffset + 4, 4);
111110

daemon/src/engine/client/cl_parse.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -472,8 +472,7 @@ void CL_ParseGamestate( msg_t *msg )
472472
Com_Error( errorParm_t::ERR_DROP, "configstring > MAX_CONFIGSTRINGS" );
473473
}
474474

475-
const char* str = MSG_ReadBigString( msg );
476-
std::string s = str;
475+
const char* str = MSG_ReadBigString( msg );
477476
cl.gameState[i] = str;
478477
}
479478
else if ( cmd == svc_baseline )

daemon/src/engine/renderer/gl_shader.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -957,7 +957,6 @@ void GLShaderManager::PrintShaderSource( Str::StringRef programName, GLuint obje
957957
{
958958
char *msg;
959959
int maxLength = 0;
960-
std::string msgText;
961960

962961
glGetShaderiv( object, GL_SHADER_SOURCE_LENGTH, &maxLength );
963962

daemon/src/engine/sys/con_curses.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -631,7 +631,6 @@ char *CON_Input()
631631
}
632632
}
633633

634-
std::u32string u32text;
635634
switch ( mode )
636635
{
637636
case MODE_UNKNOWN:

0 commit comments

Comments
 (0)