From 4c030cdad118fd574774f0fd00313e0042401c7c Mon Sep 17 00:00:00 2001 From: Maxim Mamontov Date: Mon, 7 Oct 2013 23:36:59 +0300 Subject: [PATCH 1/1] Use ::tolower from cctype in std::transform. --- .../plugins/store/firebird/firebird_store.cpp | 37 +++++++------------ 1 file changed, 13 insertions(+), 24 deletions(-) diff --git a/projects/stargazer/plugins/store/firebird/firebird_store.cpp b/projects/stargazer/plugins/store/firebird/firebird_store.cpp index 9cc7c304..7e57483e 100644 --- a/projects/stargazer/plugins/store/firebird/firebird_store.cpp +++ b/projects/stargazer/plugins/store/firebird/firebird_store.cpp @@ -26,13 +26,16 @@ * */ +#include "firebird_store.h" + +#include "stg/ibpp.h" +#include "stg/plugin_creator.h" + #include #include #include -#include "stg/ibpp.h" -#include "stg/plugin_creator.h" -#include "firebird_store.h" +#include namespace { @@ -78,55 +81,41 @@ std::string s; for(i = settings.moduleParams.begin(); i != settings.moduleParams.end(); ++i) { s = i->param; - std::transform(s.begin(), s.end(), s.begin(), ToLower()); + + std::transform(s.begin(), s.end(), s.begin(), ::tolower); + if (s == "server") - { db_server = *(i->value.begin()); - } + if (s == "database") - { db_database = *(i->value.begin()); - } + if (s == "user") - { db_user = *(i->value.begin()); - } + if (s == "password") - { db_password = *(i->value.begin()); - } // Advanced settings block if (s == "isolationLevel") { if (*(i->value.begin()) == "Concurrency") - { til = IBPP::ilConcurrency; - } else if (*(i->value.begin()) == "DirtyRead") - { til = IBPP::ilReadDirty; - } else if (*(i->value.begin()) == "ReadCommitted") - { til = IBPP::ilReadCommitted; - } else if (*(i->value.begin()) == "Consistency") - { til = IBPP::ilConsistency; - } } + if (s == "lockResolution") { if (*(i->value.begin()) == "Wait") - { tlr = IBPP::lrWait; - } else if (*(i->value.begin()) == "NoWait") - { tlr = IBPP::lrNoWait; - } } } -- 2.44.2