]> git.tdb.fi Git - libs/gl.git/commitdiff
Use the new append utility function to build GLSL compile errors
authorMikko Rasa <tdb@tdb.fi>
Thu, 4 Mar 2021 12:30:02 +0000 (14:30 +0200)
committerMikko Rasa <tdb@tdb.fi>
Thu, 4 Mar 2021 15:32:05 +0000 (17:32 +0200)
source/glsl/compiler.cpp

index 803862cb45787974a21a50628d9495009eb2fbca..d5ee6691ff83cd3d877c845431ab9a29698c1edb 100644 (file)
@@ -1,5 +1,6 @@
 #include <msp/core/algorithm.h>
 #include <msp/strings/format.h>
+#include <msp/strings/utils.h>
 #include "builtin.h"
 #include "compatibility.h"
 #include "compiler.h"
@@ -165,7 +166,7 @@ string Compiler::get_diagnostics() const
        string combined;
        for(list<Stage>::const_iterator i=module->stages.begin(); i!=module->stages.end(); ++i)
                for(vector<Diagnostic>::const_iterator j=i->diagnostics.begin(); j!=i->diagnostics.end(); ++j)
-                       combined += format("%s:%d: %s\n", module->source_map.get_name(j->source), j->line, j->message);
+                       append(combined, "\n", format("%s:%d: %s", module->source_map.get_name(j->source), j->line, j->message));
        return combined;
 }