Fix some static analysis warnings

This commit is contained in:
Graham Pentheny
2025-09-02 17:48:08 -04:00
parent 65bd5be6b3
commit bf2d57f187
2 changed files with 12 additions and 8 deletions

View File

@@ -5,7 +5,6 @@
#include <algorithm>
#ifdef WIN32
# define snprintf _snprintf
# include <io.h>
#else
# include <dirent.h>
@@ -216,7 +215,7 @@ void DebugDrawGL::begin(duDebugDrawPrimitives prim, float size)
case DU_DRAW_QUADS:
glBegin(GL_QUADS);
break;
};
}
}
void DebugDrawGL::vertex(const float* pos, unsigned int color)
@@ -344,10 +343,10 @@ size_t FileIO::getFileSize() const
void FileIO::scanDirectory(const std::string& path, const std::string& ext, std::vector<std::string>& fileList)
{
#ifdef WIN32
std::string pathWithExt = path + "/*" + ext;
const std::string pathWithExt = path + "/*" + ext;
_finddata_t dir;
intptr_t findHandle = _findfirst(pathWithExt.c_str(), &dir);
const intptr_t findHandle = _findfirst(pathWithExt.c_str(), &dir);
if (findHandle == -1L)
{
return;