diff --git a/.vscode/c_cpp_properties.json b/.vscode/c_cpp_properties.json index 58281c95..09f5028a 100644 --- a/.vscode/c_cpp_properties.json +++ b/.vscode/c_cpp_properties.json @@ -37,7 +37,7 @@ ], "defines": [], "compilerPath": "/usr/bin/gcc", - "cppStandard": "gnu++20", + "cppStandard": "gnu++23", "intelliSenseMode": "linux-gcc-x64", "cStandard": "gnu23", "compileCommands": "${workspaceFolder}/build/compile_commands.json" diff --git a/.vscode/settings.json b/.vscode/settings.json index 8194360e..9de80d9f 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -54,6 +54,7 @@ "stdexcept": "cpp", "streambuf": "cpp", "cinttypes": "cpp", - "typeinfo": "cpp" + "typeinfo": "cpp", + "*.ui": "cpp" } } \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt index 4e6afe7d..c302751c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -24,6 +24,10 @@ set(CPACK_DEBIAN_PACKAGE_DEPENDS "libgtk-4-1") include(CPack) install(DIRECTORY ${CMAKE_BINARY_DIR}/root/ DESTINATION /) +#C/C++ flags +set(CMAKE_C_STANDARD 23) +set(CMAKE_CXX_STANDARD 23) + find_package(PkgConfig) pkg_check_modules(PC_ QUIET ) set(_DEFINITIONS ${PC__CFLAGS_OTHER}) @@ -37,7 +41,6 @@ find_library(_LIBRARY NAMES set(_LIBRARIES ${_LIBRARY} ) set(_INCLUDE_DIRS ${_INCLUDE_DIR} ) -set(CMAKE_CXX_STANDARD 20) include(FindPackageHandleStandardArgs) # handle the QUIETLY and REQUIRED arguments and set _FOUND to TRUE diff --git a/include/preprocessor/GetFileContent.hpp b/include/preprocessor/GetFileContent.hpp index 785f8d97..c1e45628 100644 --- a/include/preprocessor/GetFileContent.hpp +++ b/include/preprocessor/GetFileContent.hpp @@ -9,9 +9,4 @@ * it means that every time it's called * the file content will be included in the code */ -#define GetFileContent(file_path) []() -> std::string { \ - std::ifstream file(file_path); \ - std::stringstream buffer; \ - buffer << file.rdbuf(); \ - return buffer.str(); \ -}() +#define GetFileContent(file_path) #file_path diff --git a/tools/dxdiag/layout/MainWindow.hpp b/tools/dxdiag/layout/MainWindow.hpp index 5516821d..f8ed6334 100644 --- a/tools/dxdiag/layout/MainWindow.hpp +++ b/tools/dxdiag/layout/MainWindow.hpp @@ -1,7 +1,8 @@ #pragma once -#include #include namespace MainWindow { - const std::string ui = GetFileContent(PROJECT_SOURCE_DIR "/tools/dxdiag/layout/MainWindow.ui"); + const std::string ui = + #include "MainWindow.ui" + ; } diff --git a/tools/dxdiag/layout/MainWindow.ui b/tools/dxdiag/layout/MainWindow.ui index fc5b6f1b..ed7c041f 100644 --- a/tools/dxdiag/layout/MainWindow.ui +++ b/tools/dxdiag/layout/MainWindow.ui @@ -1,4 +1,4 @@ - +R"XXX( @@ -398,3 +398,4 @@ If you know what area is causing the problem, click on the apropriate tab above. +)XXX" \ No newline at end of file diff --git a/tools/dxdiag/src/SystemTab.hpp b/tools/dxdiag/src/SystemTab.hpp index f2a6b2bf..13bb64eb 100644 --- a/tools/dxdiag/src/SystemTab.hpp +++ b/tools/dxdiag/src/SystemTab.hpp @@ -2,6 +2,8 @@ #include #include #include +#include +#include #include #include #include