diff --git a/plugins/openxr/src/OpenXrDisplayPlugin.cpp b/plugins/openxr/src/OpenXrDisplayPlugin.cpp index efd8952a7e..29843bddeb 100644 --- a/plugins/openxr/src/OpenXrDisplayPlugin.cpp +++ b/plugins/openxr/src/OpenXrDisplayPlugin.cpp @@ -16,6 +16,7 @@ #include #include #include +#include #if defined(Q_OS_WIN) #undef near @@ -133,12 +134,8 @@ static std::string glFormatStr(GLenum source) { ENUM_TO_STR(GL_RGBA16); ENUM_TO_STR(GL_RGBA16F); ENUM_TO_STR(GL_SRGB8_ALPHA8); - default: { - // TODO: Enable C++20 for std::format - std::ostringstream ss; - ss << "0x" << std::hex << source; - return ss.str(); - } + default: + return std::format("0x{:X}", source); } }