Browse Source

Test: workaround bogus Clang 6 warnings about missing declarations.

Don't you see that it's all in an anonymous namespace?!
pull/249/merge
Vladimír Vondruš 8 years ago
parent
commit
98d384e249
  1. 6
      src/Magnum/Test/ImageTest.cpp
  2. 6
      src/Magnum/Test/ImageViewTest.cpp
  3. 6
      src/Magnum/Trade/Test/ImageDataTest.cpp

6
src/Magnum/Test/ImageTest.cpp

@ -108,6 +108,9 @@ namespace {
namespace GL {
enum class PixelFormat { RGB = 666 };
enum class PixelType { UnsignedShort = 1337 };
/* Clang -Wmissing-prototypes warns otherwise, even though this is in an
anonymous namespace */
UnsignedInt pixelSize(PixelFormat, PixelType);
UnsignedInt pixelSize(PixelFormat format, PixelType type) {
CORRADE_INTERNAL_ASSERT(format == PixelFormat::RGB);
CORRADE_INTERNAL_ASSERT(type == PixelType::UnsignedShort);
@ -119,6 +122,9 @@ namespace GL {
namespace Vk {
enum class PixelFormat { R32G32B32F = 42 };
/* Clang -Wmissing-prototypes warns otherwise, even though this is in an
anonymous namespace */
UnsignedInt pixelSize(PixelFormat);
UnsignedInt pixelSize(PixelFormat format) {
CORRADE_INTERNAL_ASSERT(format == PixelFormat::R32G32B32F);
return 12;

6
src/Magnum/Test/ImageViewTest.cpp

@ -88,6 +88,9 @@ namespace {
namespace GL {
enum class PixelFormat { RGB = 666 };
enum class PixelType { UnsignedShort = 1337 };
/* Clang -Wmissing-prototypes warns otherwise, even though this is in an
anonymous namespace */
UnsignedInt pixelSize(PixelFormat, PixelType);
UnsignedInt pixelSize(PixelFormat format, PixelType type) {
CORRADE_INTERNAL_ASSERT(format == PixelFormat::RGB);
CORRADE_INTERNAL_ASSERT(type == PixelType::UnsignedShort);
@ -99,6 +102,9 @@ namespace GL {
namespace Vk {
enum class PixelFormat { R32G32B32F = 42 };
/* Clang -Wmissing-prototypes warns otherwise, even though this is in an
anonymous namespace */
UnsignedInt pixelSize(PixelFormat);
UnsignedInt pixelSize(PixelFormat format) {
CORRADE_INTERNAL_ASSERT(format == PixelFormat::R32G32B32F);
return 12;

6
src/Magnum/Trade/Test/ImageDataTest.cpp

@ -94,6 +94,9 @@ namespace {
namespace GL {
enum class PixelFormat { RGB = 666 };
enum class PixelType { UnsignedShort = 1337 };
/* Clang -Wmissing-prototypes warns otherwise, even though this is in an
anonymous namespace */
UnsignedInt pixelSize(PixelFormat, PixelType);
UnsignedInt pixelSize(PixelFormat format, PixelType type) {
CORRADE_INTERNAL_ASSERT(format == PixelFormat::RGB);
CORRADE_INTERNAL_ASSERT(type == PixelType::UnsignedShort);
@ -105,6 +108,9 @@ namespace GL {
namespace Vk {
enum class PixelFormat { R32G32B32F = 42 };
/* Clang -Wmissing-prototypes warns otherwise, even though this is in an
anonymous namespace */
UnsignedInt pixelSize(PixelFormat);
UnsignedInt pixelSize(PixelFormat format) {
CORRADE_INTERNAL_ASSERT(format == PixelFormat::R32G32B32F);
return 12;

Loading…
Cancel
Save