From cf4e7575cad8975442191160723d766b48a9623f Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Mon, 31 Oct 2016 23:57:36 -0700 Subject: Fix GCC warning about ODR violation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit There are two enums called "Operator" qdrawhelper_p.h:201:8: warning: type ‘struct Operator’ violates the C++ One Definition Rule [-Wodr] qopengl.cpp:138:6: note: a different type is defined in another translation unit Change-Id: I09100678ff4443e6be06fffd1482da1f636614b7 Reviewed-by: Marc Mutz --- src/gui/opengl/qopengl.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/gui/opengl/qopengl.cpp b/src/gui/opengl/qopengl.cpp index 3dedd7d7be..9f48d82c9d 100644 --- a/src/gui/opengl/qopengl.cpp +++ b/src/gui/opengl/qopengl.cpp @@ -129,9 +129,6 @@ QDebug operator<<(QDebug d, const QOpenGLConfig::Gpu &g) return d; } -enum Operator { NotEqual, LessThan, LessEqualThan, Equals, GreaterThan, GreaterEqualThan }; -static const char operators[][3] = {"!=", "<", "<=", "=", ">", ">="}; - static inline QString valueKey() { return QStringLiteral("value"); } static inline QString opKey() { return QStringLiteral("op"); } static inline QString versionKey() { return QStringLiteral("version"); } @@ -169,6 +166,9 @@ static inline bool contains(const QJsonArray &haystack, const QString &needle) } namespace { +enum Operator { NotEqual, LessThan, LessEqualThan, Equals, GreaterThan, GreaterEqualThan }; +static const char operators[][3] = {"!=", "<", "<=", "=", ">", ">="}; + // VersionTerm describing a version term consisting of number and operator // found in os.version and driver_version. struct VersionTerm { -- cgit v1.2.3