]> git.tdb.fi Git - libs/gl.git/commitdiff
Suppress some deprecation warnings from internal use
authorMikko Rasa <tdb@tdb.fi>
Thu, 7 Jan 2021 10:16:33 +0000 (12:16 +0200)
committerMikko Rasa <tdb@tdb.fi>
Thu, 7 Jan 2021 10:16:33 +0000 (12:16 +0200)
source/program.cpp
source/program.h
source/programbuilder.cpp

index 116e16e7251544b902ac7082e32fb82f8c624666..a5128e9b77436ef13f24bbf1de7b2e7f3b263526 100644 (file)
@@ -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)
 {
index 2906fc11ffb333d5cae42532130875ab171ad232..faaf2ac4c081c8fcadc84e366244eda74fe1a55c 100644 (file)
@@ -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 &);
index 247c249b380901623e1dfc02ac573966e445a89f..53af9793efa484d125573b2c1440dcab9bb007f9 100644 (file)
@@ -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