Skip to content

Commit

Permalink
change string construction for clang
Browse files Browse the repository at this point in the history
  • Loading branch information
anilbey committed Oct 20, 2023
1 parent 45f2b48 commit ab3c005
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions efel/cppcore/Utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
#include <algorithm>
#include <numeric>
#include <vector>
#include <sstream>
#include <string>
#include <utility>
#include "EfelExceptions.h"

Expand Down Expand Up @@ -86,8 +88,9 @@ inline void
efel_assert(bool assertion, const char *message, const char *file, const int line)
{
if(!assertion){
using std::string, std::to_string;
string errorMsg = "Assertion fired(" + string(file) + ":" + to_string(line) + "): " + string(message);
std::ostringstream os;
os << "Assertion fired(" << file << ":" << line << "): " << message;
std::string errorMsg = os.str();
throw EfelAssertionError(errorMsg);
}
}
Expand Down

0 comments on commit ab3c005

Please sign in to comment.