Browse Source

GL: apparently some of these aren't needed to be called everywhere.

StringViews are great -- given that they are trivially destructible, the
compiler can now tell me that I have unused variables. If it wouldn't be
trivially destructible (like std::string), the destructor is treated as
if it has side-effects so the compiler won't complain.
euler-xxx
Vladimír Vondruš 5 years ago
parent
commit
f6bb30d6d0
  1. 8
      src/Magnum/GL/Implementation/driverSpecific.cpp

8
src/Magnum/GL/Implementation/driverSpecific.cpp

@ -415,9 +415,15 @@ auto Context::detectedDriver() -> DetectedDrivers {
_detectedDrivers = DetectedDrivers{};
#ifndef MAGNUM_TARGET_WEBGL
const Containers::StringView renderer = rendererString();
const Containers::StringView vendor = vendorString();
#endif
#if !defined(CORRADE_TARGET_APPLE) && !defined(MAGNUM_TARGET_WEBGL)
const Containers::StringView version = versionString();
#endif
#if (!defined(CORRADE_TARGET_APPLE) && !defined(MAGNUM_TARGET_WEBGL)) || defined(MAGNUM_TARGET_GLES)
const Containers::StringView vendor = vendorString();
#endif
/* Apple has its own drivers */
#if !defined(CORRADE_TARGET_APPLE) && !defined(MAGNUM_TARGET_WEBGL)

Loading…
Cancel
Save