Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/main-GLFW_GLES2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ int main()
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 2);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 0);

GLFWwindow* window = glfwCreateWindow(800, 600, "TGUI example (GLFW-GLES2)", NULL, NULL);
GLFWwindow* window = glfwCreateWindow(800, 600, "TGUI example (GLFW-GLES2)", nullptr, nullptr);
glfwMakeContextCurrent(window);

glfwSwapInterval(1);
Expand Down
2 changes: 1 addition & 1 deletion examples/main-GLFW_OPENGL3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ int main()
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GLFW_TRUE); // Required for macOS

GLFWwindow* window = glfwCreateWindow(800, 600, "TGUI example (GLFW-OpenGL3)", NULL, NULL);
GLFWwindow* window = glfwCreateWindow(800, 600, "TGUI example (GLFW-OpenGL3)", nullptr, nullptr);
glfwMakeContextCurrent(window);

glfwSwapInterval(1);
Expand Down
2 changes: 1 addition & 1 deletion include/TGUI/Backend/Window/Backend.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ namespace tgui
/// @brief Checks whether the backend differs from a nullptr
/// @return Has setBackend been called with a valid backend?
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
TGUI_API bool isBackendSet();
[[nodiscard]] TGUI_API bool isBackendSet();

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// @brief Changes the global backend
Expand Down
2 changes: 1 addition & 1 deletion include/TGUI/Config.hpp.in
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@
// Include the version header when C++20 is available to use the library feature-testing macros
#if TGUI_COMPILED_WITH_CPP_VER >= 20
#include <version>
#elif defined(__has_include)
#else
// Try including the header even when TGUI itself wasn't compiled with C++20
#if __has_include(<version>)
#include <version>
Expand Down
2 changes: 1 addition & 1 deletion include/TGUI/Global.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ namespace tgui
///
/// @since TGUI 1.13
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
TGUI_API bool getTextInputUsesTextCursorByDefault();
[[nodiscard]] TGUI_API bool getTextInputUsesTextCursorByDefault();

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// @brief Sets the default text size for all widgets created after calling the function
Expand Down
7 changes: 2 additions & 5 deletions src/DefaultBackendWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@
namespace tgui
{
#if TGUI_HAS_BACKEND_SFML_GRAPHICS || TGUI_HAS_BACKEND_SFML_OPENGL3

class BackendWindowSFML : public DefaultBackendWindow
{
public:
Expand Down Expand Up @@ -383,7 +382,6 @@ namespace tgui
};

#elif TGUI_HAS_BACKEND_GLFW_OPENGL3 || TGUI_HAS_BACKEND_GLFW_GLES2

class BackendWindowGLFW : public DefaultBackendWindow
{
public:
Expand Down Expand Up @@ -568,7 +566,6 @@ namespace tgui
};

#elif TGUI_HAS_BACKEND_RAYLIB

class BackendWindowRaylib : public DefaultBackendWindow
{
public:
Expand Down Expand Up @@ -634,8 +631,8 @@ namespace tgui
event.type = Event::Type::Closed;
return true;
}
else // This is the second attempt to close the window (this should not happen), just close it
close();
// This is the second attempt to close the window (this should not happen), just close it
close();
}
}

Expand Down
8 changes: 3 additions & 5 deletions src/FileDialogIconLoaderLinux.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,9 @@
#include <fstream>
#include <thread>

#if defined(__has_include)
#if __has_include(<magic.h>)
#define TGUI_MAGIC_HEADER_INCLUDED
#include <magic.h>
#endif
#if __has_include(<magic.h>)
#define TGUI_MAGIC_HEADER_INCLUDED
#include <magic.h>
#endif

#if !defined(TGUI_MAGIC_HEADER_INCLUDED)
Expand Down
16 changes: 7 additions & 9 deletions src/FileDialogIconLoaderWindows.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,13 @@

#include <TGUI/extlibs/IncludeWindows.hpp>

#if defined(__has_include)
#if __has_include(<shellapi.h>)
#define TGUI_SHELL_API_HEADER_INCLUDED
#include <shellapi.h>

// MinGW.org based TDM-GCC doesn't define SHGFI_ADDOVERLAYS
#ifndef SHGFI_ADDOVERLAYS
#define SHGFI_ADDOVERLAYS 0x000000020
#endif
#if __has_include(<shellapi.h>)
#define TGUI_SHELL_API_HEADER_INCLUDED
#include <shellapi.h>

// MinGW.org based TDM-GCC doesn't define SHGFI_ADDOVERLAYS
#ifndef SHGFI_ADDOVERLAYS
#define SHGFI_ADDOVERLAYS 0x000000020
#endif
#endif

Expand Down
Loading