From 11629d96f9cce3ae7f60132d1fe560ded02c9200 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Thu, 7 Jan 2021 12:16:33 +0200 Subject: [PATCH] Suppress some deprecation warnings from internal use --- source/program.cpp | 6 +++--- source/program.h | 3 +++ source/programbuilder.cpp | 5 +++++ 3 files changed, 11 insertions(+), 3 deletions(-) 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 -- 2.45.2