sources moved to C++20

This commit is contained in:
d1str4ught
2025-09-22 00:59:25 +02:00
parent 6f721a792a
commit a9c6cfc7dc
4 changed files with 6 additions and 6 deletions

View File

@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 3.15)
project(m2dev-server-src)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_MODULE_PATH

View File

@@ -18,9 +18,8 @@ struct CUBE_VALUE
DWORD vnum;
int count;
bool operator == (const CUBE_VALUE& b)
{
return (this->count == b.count) && (this->vnum == b.vnum);
bool operator == (const CUBE_VALUE& b) const {
return std::tie(vnum, count) == std::tie(b.vnum, b.count);
}
};

View File

@@ -638,7 +638,8 @@ int start(int argc, char **argv)
}
#endif
while ((ch = getopt(argc, argv, "npverltI")) != -1)
char optstring[] = "npverltI";
while ((ch = getopt(argc, argv, optstring)) != -1)
{
char* ep = NULL;

View File

@@ -37,7 +37,7 @@ const char* first_han(const BYTE* str)
{
unsigned char high, low;
int len, i;
char* p = "그외";
const char* p = "그외";
static const char* wansung[] =
{