]> git.tdb.fi Git - libs/gl.git/commitdiff
Add missing Diagnostic constructor
authorMikko Rasa <tdb@tdb.fi>
Fri, 12 Mar 2021 19:10:39 +0000 (21:10 +0200)
committerMikko Rasa <tdb@tdb.fi>
Fri, 12 Mar 2021 19:11:27 +0000 (21:11 +0200)
This is needed by the changes in 16c02e4.

source/glsl/glsl_error.cpp
source/glsl/glsl_error.h

index aff897ca012c73b249bd63fc12fe5e3e9cfa9299..d7bf458ce7782f55ac6e59b830549a66fe27b94d 100644 (file)
@@ -19,6 +19,24 @@ parse_error::parse_error(const Location &loc, const string &token, const string
        invalid_shader_source(loc, "Parse error at '%s': expected %s", token, expected)
 { }
 
+
+Diagnostic::Diagnostic():
+       severity(INFO),
+       source(0),
+       line(0),
+       provoking_source(0),
+       provoking_line(0)
+{ }
+
+Diagnostic::Diagnostic(Severity v, int s, unsigned l, const string &m):
+       severity(v),
+       source(s),
+       line(l),
+       provoking_source(s),
+       provoking_line(l),
+       message(m)
+{ }
+
 } // namespace SL
 } // namespace GL
 } // namespace Msp
index 84aa2f52a60a45c42f6bdbe30a5fbc676e418d25..6654770cd90695457de4425374aea968b7f37d2d 100644 (file)
@@ -54,7 +54,8 @@ struct Diagnostic
        unsigned provoking_line;
        std::string message;
 
-       Diagnostic(): severity(INFO), source(-2), line(0) { }
+       Diagnostic();
+       Diagnostic(Severity, int, unsigned, const std::string &);
 };
 
 } // namespace SL