Remove unused functions

This commit is contained in:
Kawe Mazidjatari 2022-11-24 11:50:21 +01:00
parent b8b79385e1
commit 8dc12644be
2 changed files with 0 additions and 44 deletions

View File

@ -3,13 +3,6 @@
constexpr char IMGUI_BIND_PATH[] = "cfg/imgui/";
constexpr char IMGUI_BIND_FILE[] = "bind.json";
/////////////////////////////////////////////////////////////////////////////
// Internals
int Stricmp(const char* s1, const char* s2);
int Strnicmp(const char* s1, const char* s2, int n);
char* Strdup(const char* s);
void Strtrim(char* s);
enum class ImGuiStyle_t
{
NONE = -1,

View File

@ -8,43 +8,6 @@
#include "filesystem/filesystem.h"
#include "thirdparty/imgui/include/imgui_utility.h"
int Stricmp(const char* s1, const char* s2)
{
int d;
while ((d = toupper(*s2) - toupper(*s1)) == 0 && *s1)
{
s1++; s2++;
}
return d;
}
int Strnicmp(const char* s1, const char* s2, int n)
{
int d = 0; while (n > 0 && (d = toupper(*s2) - toupper(*s1)) == 0 && *s1)
{
s1++; s2++; n--;
}
return d;
}
char* Strdup(const char* s)
{
IM_ASSERT(s); size_t len = strlen(s) + 1; void* buf = malloc(len); IM_ASSERT(buf); if (buf != NULL)
{
return (char*)memcpy(buf, (const void*)s, len);
}
return NULL;
}
void Strtrim(char* s)
{
char* str_end = s + strlen(s);
while (str_end > s && str_end[-1] == ' ')
{
str_end--; *str_end = 0;
}
}
void ImGuiConfig::Load()
{
const string svPath = fmt::format("{:s}{:s}", IMGUI_BIND_PATH, IMGUI_BIND_FILE);