From 128c5c57ebf57ed6883c7826b81c49c9aac9c156 Mon Sep 17 00:00:00 2001 From: Alex Fabijanic Date: Wed, 5 Jul 2017 11:55:05 +0200 Subject: [PATCH] rename 'separator' to 'frac'; develop: PostgreSQLTest: missing ExecUtil class #1788 --- Data/PostgreSQL/testsuite/src/PostgreSQLTest.cpp | 4 ++-- Foundation/src/Var.cpp | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Data/PostgreSQL/testsuite/src/PostgreSQLTest.cpp b/Data/PostgreSQL/testsuite/src/PostgreSQLTest.cpp index deef3f3fa..c78b04cc7 100644 --- a/Data/PostgreSQL/testsuite/src/PostgreSQLTest.cpp +++ b/Data/PostgreSQL/testsuite/src/PostgreSQLTest.cpp @@ -952,8 +952,8 @@ void PostgreSQLTest::recreatePersonTimeTable() void PostgreSQLTest::recreateIntsTable() { - dropTable("Ints"); - try { *_pSession << "CREATE TABLE " << ExecUtil::ints() << " (str INTEGER)", now; } + dropTable("Strings"); + try { *_pSession << "CREATE TABLE Strings (str INTEGER)", now; } catch(ConnectionException& ce){ std::cout << ce.displayText() << std::endl; fail ("recreateIntsTable()"); } catch(StatementException& se){ std::cout << se.displayText() << std::endl; fail ("recreateIntsTable()"); } } diff --git a/Foundation/src/Var.cpp b/Foundation/src/Var.cpp index faad2f205..1dd393cf7 100644 --- a/Foundation/src/Var.cpp +++ b/Foundation/src/Var.cpp @@ -415,7 +415,7 @@ Var Var::parse(const std::string& val, std::string::size_type& pos) bool isNumber = false; bool isSigned = false; int separators = 0; - int separator = 0; + int frac = 0; int index = 0; size_t size = str.size(); for (size_t i = 0; i < size ; ++i) @@ -432,7 +432,7 @@ Var Var::parse(const std::string& val, std::string::size_type& pos) } else if (ch == '.' || ch == ',') { - separator = ch; + frac = ch; ++separators; if (separators > 1) return str; @@ -443,17 +443,17 @@ Var Var::parse(const std::string& val, std::string::size_type& pos) ++index; } - if (separator && isNumber) + if (frac && isNumber) { - const double number = NumberParser::parseFloat(str, separator); + const double number = NumberParser::parseFloat(str, frac); return Var(number); } - else if (separator == 0 && isNumber && isSigned) + else if (frac == 0 && isNumber && isSigned) { const Poco::Int64 number = NumberParser::parse64(str); return number; } - else if (separator == 0 && isNumber && !isSigned) + else if (frac == 0 && isNumber && !isSigned) { const Poco::UInt64 number = NumberParser::parseUnsigned64(str); return number;