X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Fglsl%2Fgenerate.cpp;h=2ff751946528f75e2a39f6a512565231ed10ce8c;hp=c670bc1a814ee1002eac71285c9002fe568c1968;hb=6dcf74922f46b086ad394c19fd6ce083a635b290;hpb=713ff9619daa858ffbd428f7699cd57598563dbd diff --git a/source/glsl/generate.cpp b/source/glsl/generate.cpp index c670bc1a..2ff75194 100644 --- a/source/glsl/generate.cpp +++ b/source/glsl/generate.cpp @@ -986,6 +986,15 @@ void FunctionResolver::visit(FunctionDeclaration &func) vector &decls = declarations[key]; if(func.definition==&func) { + if(stage_decl && stage_decl->definition) + { + if(!func.overrd) + stage->diagnostics.push_back(Diagnostic(Diagnostic::WARN, func.source, func.line, + format("Overriding function '%s' without the override keyword is deprecated", key))); + if(!stage_decl->definition->virtua) + stage->diagnostics.push_back(Diagnostic(Diagnostic::WARN, func.source, func.line, + format("Overriding function '%s' not declared as virtual is deprecated", key))); + } stage_decl = &func; // Set all previous declarations to use this definition.