summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Müller <robert.mueller@uni-siegen.de>2022-02-16 21:29:21 +0100
committerRobert Müller <robytemueller@gmail.com>2023-06-16 20:34:29 +0200
commit7d8cbb15d1daae81c38d9ea62f3b732af2fd729d (patch)
tree28f3ab0345972019e66c72d5eaf7d02db31f96f0
parent537c16b3663ca36f7a77ac3e88e0dce9a2476490 (diff)
Remove obsolete ignore_convention comments
-rw-r--r--src/engine/client/client.cpp18
-rw-r--r--src/engine/client/graphics_threaded.cpp26
-rw-r--r--src/engine/client/input.cpp22
-rw-r--r--src/engine/client/sound.cpp12
-rw-r--r--src/engine/client/textrender.cpp8
-rw-r--r--src/engine/server/server.cpp16
-rw-r--r--src/engine/shared/datafile.cpp6
-rw-r--r--src/engine/shared/storage.cpp2
8 files changed, 55 insertions, 55 deletions
diff --git a/src/engine/client/client.cpp b/src/engine/client/client.cpp
index 09e63b1ae..e15e06f56 100644
--- a/src/engine/client/client.cpp
+++ b/src/engine/client/client.cpp
@@ -1932,7 +1932,7 @@ void CClient::Run()
return;
}
- atexit(SDL_Quit); // ignore_convention
+ atexit(SDL_Quit);
}
// init graphics
@@ -2556,17 +2556,17 @@ void CClient::DoVersionSpecificActions()
Upstream latency
*/
#if defined(CONF_PLATFORM_MACOS)
-extern "C" int TWMain(int argc, const char **argv) // ignore_convention
+extern "C" int TWMain(int argc, const char **argv)
#else
-int main(int argc, const char **argv) // ignore_convention
+int main(int argc, const char **argv)
#endif
{
cmdline_fix(&argc, &argv);
#if defined(CONF_FAMILY_WINDOWS)
bool QuickEditMode = false;
- for(int i = 1; i < argc; i++) // ignore_convention
+ for(int i = 1; i < argc; i++)
{
- if(str_comp("--quickeditmode", argv[i]) == 0) // ignore_convention
+ if(str_comp("--quickeditmode", argv[i]) == 0)
{
QuickEditMode = true;
}
@@ -2574,9 +2574,9 @@ int main(int argc, const char **argv) // ignore_convention
#endif
bool UseDefaultConfig = false;
- for(int i = 1; i < argc; i++) // ignore_convention
+ for(int i = 1; i < argc; i++)
{
- if(str_comp("-d", argv[i]) == 0 || str_comp("--default", argv[i]) == 0) // ignore_convention
+ if(str_comp("-d", argv[i]) == 0 || str_comp("--default", argv[i]) == 0)
{
UseDefaultConfig = true;
break;
@@ -2594,7 +2594,7 @@ int main(int argc, const char **argv) // ignore_convention
int FlagMask = CFGFLAG_CLIENT;
IEngine *pEngine = CreateEngine("Teeworlds");
IConsole *pConsole = CreateConsole(FlagMask);
- IStorage *pStorage = CreateStorage("Teeworlds", IStorage::STORAGETYPE_CLIENT, argc, argv); // ignore_convention
+ IStorage *pStorage = CreateStorage("Teeworlds", IStorage::STORAGETYPE_CLIENT, argc, argv);
IConfigManager *pConfigManager = CreateConfigManager();
IEngineSound *pEngineSound = CreateEngineSound();
IEngineInput *pEngineInput = CreateEngineInput();
@@ -2665,7 +2665,7 @@ int main(int argc, const char **argv) // ignore_convention
pConsole->ExecuteFile("autoexec.cfg");
// parse the command line arguments
- if(argc > 1) // ignore_convention
+ if(argc > 1)
{
const char *pAddress = 0;
if(argc == 2)
diff --git a/src/engine/client/graphics_threaded.cpp b/src/engine/client/graphics_threaded.cpp
index 00be6121c..b9f7125b5 100644
--- a/src/engine/client/graphics_threaded.cpp
+++ b/src/engine/client/graphics_threaded.cpp
@@ -408,9 +408,9 @@ int CGraphics_Threaded::LoadPNG(CImageInfo *pImg, const char *pFilename, int Sto
return 0;
}
- png_init(0, 0); // ignore_convention
- png_t Png; // ignore_convention
- int Error = png_open_read(&Png, 0, File); // ignore_convention
+ png_init(0, 0);
+ png_t Png;
+ int Error = png_open_read(&Png, 0, File);
if(Error != PNG_NO_ERROR)
{
dbg_msg("game/png", "failed to read file. filename='%s'", aCompleteFilename);
@@ -418,22 +418,22 @@ int CGraphics_Threaded::LoadPNG(CImageInfo *pImg, const char *pFilename, int Sto
return 0;
}
- if(Png.depth != 8 || (Png.color_type != PNG_TRUECOLOR && Png.color_type != PNG_TRUECOLOR_ALPHA) || Png.width > (2<<12) || Png.height > (2<<12)) // ignore_convention
+ if(Png.depth != 8 || (Png.color_type != PNG_TRUECOLOR && Png.color_type != PNG_TRUECOLOR_ALPHA) || Png.width > (2<<12) || Png.height > (2<<12))
{
dbg_msg("game/png", "invalid format. filename='%s'", aCompleteFilename);
io_close(File);
return 0;
}
- unsigned char *pBuffer = (unsigned char *)mem_alloc(Png.width * Png.height * Png.bpp); // ignore_convention
- png_get_data(&Png, pBuffer); // ignore_convention
+ unsigned char *pBuffer = (unsigned char *)mem_alloc(Png.width * Png.height * Png.bpp);
+ png_get_data(&Png, pBuffer);
io_close(File);
- pImg->m_Width = Png.width; // ignore_convention
- pImg->m_Height = Png.height; // ignore_convention
- if(Png.color_type == PNG_TRUECOLOR) // ignore_convention
+ pImg->m_Width = Png.width;
+ pImg->m_Height = Png.height;
+ if(Png.color_type == PNG_TRUECOLOR)
pImg->m_Format = CImageInfo::FORMAT_RGB;
- else if(Png.color_type == PNG_TRUECOLOR_ALPHA) // ignore_convention
+ else if(Png.color_type == PNG_TRUECOLOR_ALPHA)
pImg->m_Format = CImageInfo::FORMAT_RGBA;
pImg->m_pData = pBuffer;
return 1;
@@ -474,9 +474,9 @@ void CGraphics_Threaded::ScreenshotDirect(const char *pFilename)
if(File)
{
// save png
- png_t Png; // ignore_convention
- png_open_write(&Png, 0, File); // ignore_convention
- png_set_data(&Png, Image.m_Width, Image.m_Height, 8, PNG_TRUECOLOR, (unsigned char *)Image.m_pData); // ignore_convention
+ png_t Png;
+ png_open_write(&Png, 0, File);
+ png_set_data(&Png, Image.m_Width, Image.m_Height, 8, PNG_TRUECOLOR, (unsigned char *)Image.m_pData);
io_close(File);
str_format(aBuf, sizeof(aBuf), "saved screenshot to '%s'", aWholePath);
}
diff --git a/src/engine/client/input.cpp b/src/engine/client/input.cpp
index 06e9df9c9..4969696b3 100644
--- a/src/engine/client/input.cpp
+++ b/src/engine/client/input.cpp
@@ -593,7 +593,7 @@ int CInput::Update()
// fall through
case SDL_MOUSEBUTTONDOWN:
- if(Event.button.button == SDL_BUTTON_LEFT) // ignore_convention
+ if(Event.button.button == SDL_BUTTON_LEFT)
{
Key = KEY_MOUSE_1;
if(Event.button.clicks%2 == 0)
@@ -601,20 +601,20 @@ int CInput::Update()
else if(Event.button.clicks == 1)
m_MouseDoubleClick = false;
}
- else if(Event.button.button == SDL_BUTTON_RIGHT) Key = KEY_MOUSE_2; // ignore_convention
- else if(Event.button.button == SDL_BUTTON_MIDDLE) Key = KEY_MOUSE_3; // ignore_convention
- else if(Event.button.button == SDL_BUTTON_X1) Key = KEY_MOUSE_4; // ignore_convention
- else if(Event.button.button == SDL_BUTTON_X2) Key = KEY_MOUSE_5; // ignore_convention
- else if(Event.button.button == 6) Key = KEY_MOUSE_6; // ignore_convention
- else if(Event.button.button == 7) Key = KEY_MOUSE_7; // ignore_convention
- else if(Event.button.button == 8) Key = KEY_MOUSE_8; // ignore_convention
- else if(Event.button.button == 9) Key = KEY_MOUSE_9; // ignore_convention
+ else if(Event.button.button == SDL_BUTTON_RIGHT) Key = KEY_MOUSE_2;
+ else if(Event.button.button == SDL_BUTTON_MIDDLE) Key = KEY_MOUSE_3;
+ else if(Event.button.button == SDL_BUTTON_X1) Key = KEY_MOUSE_4;
+ else if(Event.button.button == SDL_BUTTON_X2) Key = KEY_MOUSE_5;
+ else if(Event.button.button == 6) Key = KEY_MOUSE_6;
+ else if(Event.button.button == 7) Key = KEY_MOUSE_7;
+ else if(Event.button.button == 8) Key = KEY_MOUSE_8;
+ else if(Event.button.button == 9) Key = KEY_MOUSE_9;
Scancode = Key;
break;
case SDL_MOUSEWHEEL:
- if(Event.wheel.y > 0) Key = KEY_MOUSE_WHEEL_UP; // ignore_convention
- else if(Event.wheel.y < 0) Key = KEY_MOUSE_WHEEL_DOWN; // ignore_convention
+ if(Event.wheel.y > 0) Key = KEY_MOUSE_WHEEL_UP;
+ else if(Event.wheel.y < 0) Key = KEY_MOUSE_WHEEL_DOWN;
else break;
Action |= IInput::FLAG_RELEASE;
Scancode = Key;
diff --git a/src/engine/client/sound.cpp b/src/engine/client/sound.cpp
index 9f59a6c2f..c8184b925 100644
--- a/src/engine/client/sound.cpp
+++ b/src/engine/client/sound.cpp
@@ -221,12 +221,12 @@ int CSound::Init()
m_MixingRate = m_pConfig->m_SndRate;
// Set 16-bit stereo audio at 22Khz
- Format.freq = m_pConfig->m_SndRate; // ignore_convention
- Format.format = AUDIO_S16; // ignore_convention
- Format.channels = 2; // ignore_convention
- Format.samples = m_pConfig->m_SndBufferSize; // ignore_convention
- Format.callback = SdlCallback; // ignore_convention
- Format.userdata = NULL; // ignore_convention
+ Format.freq = m_pConfig->m_SndRate;
+ Format.format = AUDIO_S16;
+ Format.channels = 2;
+ Format.samples = m_pConfig->m_SndBufferSize;
+ Format.callback = SdlCallback;
+ Format.userdata = NULL;
// Open the audio device and start playing sound!
if(SDL_OpenAudio(&Format, NULL) < 0)
diff --git a/src/engine/client/textrender.cpp b/src/engine/client/textrender.cpp
index 1a3c99bf2..255216825 100644
--- a/src/engine/client/textrender.cpp
+++ b/src/engine/client/textrender.cpp
@@ -388,7 +388,7 @@ bool CGlyphMap::RenderGlyph(CGlyph *pGlyph, bool Render)
return false;
}
- pBitmap = &GlyphFace->glyph->bitmap; // ignore_convention
+ pBitmap = &GlyphFace->glyph->bitmap;
// adjust spacing
int OutlineThickness = AdjustOutlineThicknessToFontSize(1, FontSize);
@@ -452,9 +452,9 @@ bool CGlyphMap::RenderGlyph(CGlyph *pGlyph, bool Render)
pGlyph->m_Face = GlyphFace;
pGlyph->m_Height = OutlinedHeight * Scale;
pGlyph->m_Width = OutlinedWidth * Scale;
- pGlyph->m_BearingX = (GlyphFace->glyph->bitmap_left-OutlineThickness/2) * Scale; // ignore_convention
- pGlyph->m_BearingY = (FontSize - GlyphFace->glyph->bitmap_top-OutlineThickness/2) * Scale; // ignore_convention
- pGlyph->m_AdvanceX = (GlyphFace->glyph->advance.x>>6) * Scale; // ignore_convention
+ pGlyph->m_BearingX = (GlyphFace->glyph->bitmap_left-OutlineThickness/2) * Scale;
+ pGlyph->m_BearingY = (FontSize - GlyphFace->glyph->bitmap_top-OutlineThickness/2) * Scale;
+ pGlyph->m_AdvanceX = (GlyphFace->glyph->advance.x>>6) * Scale;
pGlyph->m_Rendered = Render;
return true;
diff --git a/src/engine/server/server.cpp b/src/engine/server/server.cpp
index 18a796eb6..9dc61e365 100644
--- a/src/engine/server/server.cpp
+++ b/src/engine/server/server.cpp
@@ -1816,13 +1816,13 @@ void HandleSigIntTerm(int Param)
signal(SIGTERM, SIG_DFL);
}
-int main(int argc, const char **argv) // ignore_convention
+int main(int argc, const char **argv)
{
cmdline_fix(&argc, &argv);
#if defined(CONF_FAMILY_WINDOWS)
- for(int i = 1; i < argc; i++) // ignore_convention
+ for(int i = 1; i < argc; i++)
{
- if(str_comp("-s", argv[i]) == 0 || str_comp("--silent", argv[i]) == 0) // ignore_convention
+ if(str_comp("-s", argv[i]) == 0 || str_comp("--silent", argv[i]) == 0)
{
dbg_console_hide();
break;
@@ -1831,9 +1831,9 @@ int main(int argc, const char **argv) // ignore_convention
#endif
bool UseDefaultConfig = false;
- for(int i = 1; i < argc; i++) // ignore_convention
+ for(int i = 1; i < argc; i++)
{
- if(str_comp("-d", argv[i]) == 0 || str_comp("--default", argv[i]) == 0) // ignore_convention
+ if(str_comp("-d", argv[i]) == 0 || str_comp("--default", argv[i]) == 0)
{
UseDefaultConfig = true;
break;
@@ -1860,7 +1860,7 @@ int main(int argc, const char **argv) // ignore_convention
IGameServer *pGameServer = CreateGameServer();
IConsole *pConsole = CreateConsole(CFGFLAG_SERVER|CFGFLAG_ECON);
IEngineMasterServer *pEngineMasterServer = CreateEngineMasterServer();
- IStorage *pStorage = CreateStorage("Teeworlds", IStorage::STORAGETYPE_SERVER, argc, argv); // ignore_convention
+ IStorage *pStorage = CreateStorage("Teeworlds", IStorage::STORAGETYPE_SERVER, argc, argv);
IConfigManager *pConfigManager = CreateConfigManager();
pServer->InitRegister(&pServer->m_NetServer, pEngineMasterServer, pConfigManager->Values(), pConsole);
@@ -1900,8 +1900,8 @@ int main(int argc, const char **argv) // ignore_convention
pConsole->ExecuteFile("autoexec.cfg");
// parse the command line arguments
- if(argc > 1) // ignore_convention
- pConsole->ParseArguments(argc-1, &argv[1]); // ignore_convention
+ if(argc > 1)
+ pConsole->ParseArguments(argc-1, &argv[1]);
}
// restore empty config strings to their defaults
diff --git a/src/engine/shared/datafile.cpp b/src/engine/shared/datafile.cpp
index d0b88376f..bc6b5a69e 100644
--- a/src/engine/shared/datafile.cpp
+++ b/src/engine/shared/datafile.cpp
@@ -100,7 +100,7 @@ bool CDataFileReader::Open(class IStorage *pStorage, const char *pFilename, int
if(Bytes == 0)
break;
sha256_update(&Sha256Ctx, aBuffer, Bytes);
- Crc = crc32(Crc, aBuffer, Bytes); // ignore_convention
+ Crc = crc32(Crc, aBuffer, Bytes);
}
io_seek(File, 0, IOSEEK_START);
@@ -309,7 +309,7 @@ void *CDataFileReader::GetDataImpl(int Index, int Swap)
// decompress the data, TODO: check for errors
s = UncompressedSize;
- uncompress((Bytef*)m_pDataFile->m_ppDataPtrs[Index], &s, (Bytef*)pTemp, DataSize); // ignore_convention
+ uncompress((Bytef*)m_pDataFile->m_ppDataPtrs[Index], &s, (Bytef*)pTemp, DataSize);
#if defined(CONF_ARCH_ENDIAN_BIG)
SwapSize = s;
#endif
@@ -586,7 +586,7 @@ int CDataFileWriter::AddData(int Size, const void *pData)
unsigned long s = compressBound(Size);
void *pCompData = mem_alloc(s); // temporary buffer that we use during compression
- int Result = compress((Bytef*)pCompData, &s, (Bytef*)pData, Size); // ignore_convention
+ int Result = compress((Bytef*)pCompData, &s, (Bytef*)pData, Size);
if(Result != Z_OK)
{
dbg_msg("datafile", "compression error %d", Result);
diff --git a/src/engine/shared/storage.cpp b/src/engine/shared/storage.cpp
index 993f58bf6..4c2605a17 100644
--- a/src/engine/shared/storage.cpp
+++ b/src/engine/shared/storage.cpp
@@ -586,7 +586,7 @@ public:
if(Bytes <= 0)
break;
sha256_update(&Sha256Ctx, aBuffer, Bytes);
- Crc = crc32(Crc, aBuffer, Bytes); // ignore_convention
+ Crc = crc32(Crc, aBuffer, Bytes);
Size += Bytes;
}