diff options
author | Tobias Hunger <tobias.hunger@qt.io> | 2019-04-16 16:32:08 +0200 |
---|---|---|
committer | Tobias Hunger <tobias.hunger@qt.io> | 2019-04-16 16:32:08 +0200 |
commit | 6630937e63ae5797487b86743a7733c8ae5cc42c (patch) | |
tree | 3d53dacf6430f9099e1fb20835881205de674961 /src/3rdparty/angle/src/compiler/translator/InfoSink.cpp | |
parent | 37ed6dae00640f9cc980ffda05347c12a7eb5d7e (diff) | |
parent | c7af193d2e49e9f10b86262e63d8d13abf72b5cf (diff) |
Merge commit 'dev' into 'wip/cmake-merge'
Change-Id: I176c40d031be26a1dd1cf08843e448a660598783
Diffstat (limited to 'src/3rdparty/angle/src/compiler/translator/InfoSink.cpp')
-rw-r--r-- | src/3rdparty/angle/src/compiler/translator/InfoSink.cpp | 38 |
1 files changed, 12 insertions, 26 deletions
diff --git a/src/3rdparty/angle/src/compiler/translator/InfoSink.cpp b/src/3rdparty/angle/src/compiler/translator/InfoSink.cpp index cd59658ff7..db26aa67e8 100644 --- a/src/3rdparty/angle/src/compiler/translator/InfoSink.cpp +++ b/src/3rdparty/angle/src/compiler/translator/InfoSink.cpp @@ -6,32 +6,27 @@ #include "compiler/translator/InfoSink.h" -void TInfoSinkBase::prefix(TPrefixType p) { - switch(p) { - case EPrefixNone: - break; - case EPrefixWarning: +namespace sh +{ + +void TInfoSinkBase::prefix(Severity severity) +{ + switch (severity) + { + case SH_WARNING: sink.append("WARNING: "); break; - case EPrefixError: + case SH_ERROR: sink.append("ERROR: "); break; - case EPrefixInternalError: - sink.append("INTERNAL ERROR: "); - break; - case EPrefixUnimplemented: - sink.append("UNIMPLEMENTED: "); - break; - case EPrefixNote: - sink.append("NOTE: "); - break; default: sink.append("UNKOWN ERROR: "); break; } } -void TInfoSinkBase::location(int file, int line) { +void TInfoSinkBase::location(int file, int line) +{ TPersistStringStream stream; if (line) stream << file << ":" << line; @@ -42,13 +37,4 @@ void TInfoSinkBase::location(int file, int line) { sink.append(stream.str()); } -void TInfoSinkBase::location(const TSourceLoc& loc) { - location(loc.first_file, loc.first_line); -} - -void TInfoSinkBase::message(TPrefixType p, const TSourceLoc& loc, const char* m) { - prefix(p); - location(loc); - sink.append(m); - sink.append("\n"); -} +} // namespace sh |