From: Mikko Rasa Date: Thu, 7 Jan 2021 10:16:33 +0000 (+0200) Subject: Suppress some deprecation warnings from internal use X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=11629d96f9cce3ae7f60132d1fe560ded02c9200;p=libs%2Fgl.git Suppress some deprecation warnings from internal use --- diff --git a/source/program.cpp b/source/program.cpp index 116e16e7..a5128e9b 100644 --- a/source/program.cpp +++ b/source/program.cpp @@ -28,17 +28,17 @@ Program::Program() init(); } +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" Program::Program(const ProgramBuilder::StandardFeatures &features) { init(); -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wdeprecated-declarations" ProgramBuilder builder(features); builder.add_shaders(*this); -#pragma GCC diagnostic pop link(); } +#pragma GCC diagnostic pop Program::Program(const std::string &source) { diff --git a/source/program.h b/source/program.h index 2906fc11..faaf2ac4 100644 --- a/source/program.h +++ b/source/program.h @@ -86,8 +86,11 @@ public: /// Constructs an empty Program with no Shaders attached. Program(); +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" /// Constructs a Program with standard features. DEPRECATED Program(const ProgramBuilder::StandardFeatures &); +#pragma GCC diagnostic pop /// Constructs a Program from unified source code using ProgramCompiler. Program(const std::string &); diff --git a/source/programbuilder.cpp b/source/programbuilder.cpp index 247c249b..53af9793 100644 --- a/source/programbuilder.cpp +++ b/source/programbuilder.cpp @@ -15,6 +15,9 @@ using namespace std; namespace Msp { namespace GL { +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + /* Naming conventions: n_* Normalized vector @@ -1162,5 +1165,7 @@ ProgramBuilder::StandardFeatures::Loader::Loader(StandardFeatures &f): add("normalmap", &StandardFeatures::normal_map); } +#pragma GCC diagnostic pop + } // namespace GL } // namespace Msp