Skip to content

Commit

Permalink
fix clang compatibility issue (#330)
Browse files Browse the repository at this point in the history
* clang warning: remove unused variable

* change string construction for clang
  • Loading branch information
anilbey authored Oct 23, 2023
1 parent ed1459c commit 4c90c0f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
1 change: 0 additions & 1 deletion efel/cppcore/LibV1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,6 @@ static int __burst_ISI_indices(double BurstFactor, vector<int>& PeakIndex,
vector<double>& ISIValues,
vector<int>& BurstIndex) {
vector<double> ISIpcopy;
vector<double>::iterator it1, it2;
int n, count = -1;
double dMedian;

Expand Down
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 4c90c0f

Please sign in to comment.