From b32b8d605a39d058e4e7bbe1563441cca803b5d4 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Fri, 12 Mar 2021 21:10:39 +0200 Subject: [PATCH] Add missing Diagnostic constructor This is needed by the changes in 16c02e4. --- source/glsl/glsl_error.cpp | 18 ++++++++++++++++++ source/glsl/glsl_error.h | 3 ++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/source/glsl/glsl_error.cpp b/source/glsl/glsl_error.cpp index aff897ca..d7bf458c 100644 --- a/source/glsl/glsl_error.cpp +++ b/source/glsl/glsl_error.cpp @@ -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 diff --git a/source/glsl/glsl_error.h b/source/glsl/glsl_error.h index 84aa2f52..6654770c 100644 --- a/source/glsl/glsl_error.h +++ b/source/glsl/glsl_error.h @@ -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 -- 2.43.0