Skip to content

Commit

Permalink
Merge pull request #346 from arvanus/master
Browse files Browse the repository at this point in the history
FIx warnings at debian 11 and 12
  • Loading branch information
arvanus authored Nov 6, 2023
2 parents 0d13400 + 7f137dd commit 7e5a999
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ibpp/statement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -717,7 +717,7 @@ std::string StatementImpl::ParametersParser(std::string sql)
//Here we verify, the job done recently was time lost?
std::string isDML(sql);

isDML.erase(isDML.begin(), std::find_if(isDML.begin(), isDML.end(), std::not1(std::ptr_fun<int, int>(std::isspace)))); //lTrim
isDML.erase(isDML.begin(), std::find_if(isDML.begin(), isDML.end(), [](int c) { return !std::isspace(c); })); //lTrim

std::transform(isDML.begin(), isDML.end(), isDML.begin(), [](char c) { return (char)std::toupper(c); }); //UpperCase (only bothered about ASCII text, cast is okay)

Expand Down Expand Up @@ -790,7 +790,7 @@ std::string StatementImpl::ParametersParser(std::string sql)
if (i > 0)
previousChar=sql.at(i-1);

if ((sql.at(i)=='\n') | (sql.at(i)=='\r')) {
if ((sql.at(i)=='\n') || (sql.at(i)=='\r')) {
comment = false;
//sProcessedSQL << sql.at(i);
}else if (sql.at(i)=='-' && nextChar=='-' && !quote && !doubleQuote && !blockComment) {
Expand Down

0 comments on commit 7e5a999

Please sign in to comment.