From a9e9ced331c98f670c625c6847e917669b8eafac Mon Sep 17 00:00:00 2001 From: antao Date: Mon, 21 Jan 2019 17:32:49 +0800 Subject: [PATCH] Use references instead of values in range-based for loop --- drogon_ctl/create_controller.cc | 2 +- drogon_ctl/create_model.cc | 6 +++--- drogon_ctl/create_view.cc | 2 +- drogon_ctl/help.cc | 2 +- examples/client_example/main.cc | 2 +- examples/simple_example/api_Attachment.cc | 2 +- lib/inc/drogon/HttpAppFramework.h | 2 +- lib/inc/drogon/HttpSimpleController.h | 3 ++- lib/inc/drogon/WebSocketController.h | 4 ++-- lib/src/ConfigLoader.cc | 14 +++++++------- lib/src/DrClassMap.cc | 2 +- lib/src/HttpAppFrameworkImpl.cc | 10 +++++----- lib/src/HttpControllersRouter.cc | 8 ++++---- lib/src/HttpRequestImpl.cc | 2 +- lib/src/HttpResponseImpl.cc | 4 +--- lib/src/HttpSimpleControllersRouter.cc | 4 ++-- lib/src/SharedLibManager.cc | 2 +- lib/src/Utilities.cc | 2 +- orm_lib/inc/drogon/orm/Mapper.h | 18 +++++++++--------- orm_lib/inc/drogon/orm/SqlBinder.h | 2 +- orm_lib/src/DbClientImpl.cc | 2 +- orm_lib/src/TransactionImpl.cc | 2 +- orm_lib/src/mysql_impl/MysqlConnection.cc | 2 +- orm_lib/src/mysql_impl/test/test1.cc | 6 +++--- orm_lib/src/postgresql_impl/test/test1.cc | 6 +++--- orm_lib/src/sqlite3_impl/Sqlite3Connection.cc | 2 +- orm_lib/src/sqlite3_impl/test/test1.cc | 2 +- trantor | 2 +- 28 files changed, 58 insertions(+), 59 deletions(-) diff --git a/drogon_ctl/create_controller.cc b/drogon_ctl/create_controller.cc index 421ec764..b511befe 100755 --- a/drogon_ctl/create_controller.cc +++ b/drogon_ctl/create_controller.cc @@ -253,7 +253,7 @@ void create_controller::createController(std::vector &httpClasses, return; } } - for (auto className : httpClasses) + for (auto const &className : httpClasses) { createController(className, type); } diff --git a/drogon_ctl/create_model.cc b/drogon_ctl/create_model.cc index 5f0b14cb..fc34ea19 100644 --- a/drogon_ctl/create_model.cc +++ b/drogon_ctl/create_model.cc @@ -386,7 +386,7 @@ void create_model::createModelClassFromMysql(const std::string &path, const DbCl exit(1); }; std::vector pkNames, pkTypes; - for (auto col : cols) + for (auto const &col : cols) { if (col._isPrimaryKey) { @@ -508,7 +508,7 @@ void create_model::createModelClassFromSqlite3(const std::string &path, const Db } std::vector pkNames, pkTypes; - for (auto col : cols) + for (auto const &col : cols) { if (col._isPrimaryKey) { @@ -764,7 +764,7 @@ void create_model::handleCommand(std::vector ¶meters) { std::cerr << "Missing Model path name!" << std::endl; } - for (auto path : parameters) + for (auto const &path : parameters) { createModel(path); } diff --git a/drogon_ctl/create_view.cc b/drogon_ctl/create_view.cc index eee8f03b..227e75ae 100755 --- a/drogon_ctl/create_view.cc +++ b/drogon_ctl/create_view.cc @@ -220,7 +220,7 @@ void create_view::handleCommand(std::vector ¶meters) void create_view::createViewFiles(std::vector &cspFileNames) { - for (auto file : cspFileNames) + for (auto const &file : cspFileNames) { std::cout << "create view:" << file << std::endl; createViewFile(file); diff --git a/drogon_ctl/help.cc b/drogon_ctl/help.cc index 2e8be69b..48459ea4 100755 --- a/drogon_ctl/help.cc +++ b/drogon_ctl/help.cc @@ -23,7 +23,7 @@ void help::handleCommand(std::vector ¶meters) { std::cout << "usage: drogon_ctl []" << std::endl; std::cout << "commands list:" << std::endl; - for (auto className : drogon::DrClassMap::getAllClassName()) + for (auto &className : drogon::DrClassMap::getAllClassName()) { auto classPtr = std::shared_ptr(drogon::DrClassMap::newObject(className)); if (classPtr) diff --git a/examples/client_example/main.cc b/examples/client_example/main.cc index 96c3c593..2392b8b2 100644 --- a/examples/client_example/main.cc +++ b/examples/client_example/main.cc @@ -20,7 +20,7 @@ int main() count++; std::cout << response->getBody() << std::endl; auto cookies = response->cookies(); - for (auto &cookie : cookies) + for (auto const &cookie : cookies) { std::cout << cookie.first << "=" << cookie.second.value() << ":domain=" << cookie.second.domain() << std::endl; } diff --git a/examples/simple_example/api_Attachment.cc b/examples/simple_example/api_Attachment.cc index ea9cc62e..805e4574 100644 --- a/examples/simple_example/api_Attachment.cc +++ b/examples/simple_example/api_Attachment.cc @@ -14,7 +14,7 @@ void Attachment::upload(const HttpRequestPtr &req, FileUpload fileUpload; fileUpload.parse(req); auto files = fileUpload.getFiles(); - for (auto file : files) + for (auto const &file : files) { LOG_DEBUG << "file:" << file.getFileName() diff --git a/lib/inc/drogon/HttpAppFramework.h b/lib/inc/drogon/HttpAppFramework.h index b702126a..5af366cd 100755 --- a/lib/inc/drogon/HttpAppFramework.h +++ b/lib/inc/drogon/HttpAppFramework.h @@ -127,7 +127,7 @@ class HttpAppFramework : public trantor::NonCopyable std::vector validMethods; std::vector filters; - for (auto &filterOrMethod : filtersAndMethods) + for (auto const &filterOrMethod : filtersAndMethods) { if (filterOrMethod.type() == typeid(std::string)) { diff --git a/lib/inc/drogon/HttpSimpleController.h b/lib/inc/drogon/HttpSimpleController.h index 2f52f2d7..3605241e 100755 --- a/lib/inc/drogon/HttpSimpleController.h +++ b/lib/inc/drogon/HttpSimpleController.h @@ -61,9 +61,10 @@ class HttpSimpleController : public DrObject, public HttpSimpleControllerBase } protected: + ///FIXME!!! void _register(const std::string &className, const std::vector &paths) { - for (auto reqPath : paths) + for (auto const &reqPath : paths) { std::cout << "register controller class " << className << " on path " << reqPath << std::endl; } diff --git a/lib/inc/drogon/WebSocketController.h b/lib/inc/drogon/WebSocketController.h index 43a022e1..3693c32d 100644 --- a/lib/inc/drogon/WebSocketController.h +++ b/lib/inc/drogon/WebSocketController.h @@ -68,7 +68,7 @@ class WebSocketController : public DrObject, public WebSocketControllerBase { auto vPaths = T::paths(); - for (auto path : vPaths) + for (auto const &path : vPaths) { LOG_TRACE << "register websocket controller (" << WebSocketController::classTypeName() << ") on path:" << path.first; HttpAppFramework::instance().registerWebSocketController(path.first, @@ -80,7 +80,7 @@ class WebSocketController : public DrObject, public WebSocketControllerBase protected: void _register(const std::string &className, const std::vector &paths) { - for (auto reqPath : paths) + for (auto const &reqPath : paths) { std::cout << "register controller class " << className << " on path " << reqPath << std::endl; } diff --git a/lib/src/ConfigLoader.cc b/lib/src/ConfigLoader.cc index 5bcbd105..f380e693 100644 --- a/lib/src/ConfigLoader.cc +++ b/lib/src/ConfigLoader.cc @@ -87,7 +87,7 @@ static void loadControllers(const Json::Value &controllers) { if (!controllers) return; - for (auto controller : controllers) + for (auto const &controller : controllers) { auto path = controller.get("path", "").asString(); auto ctrlName = controller.get("controller", "").asString(); @@ -96,7 +96,7 @@ static void loadControllers(const Json::Value &controllers) std::vector constraints; if (!controller["http_methods"].isNull()) { - for (auto method : controller["http_methods"]) + for (auto const &method : controller["http_methods"]) { auto strMethod = method.asString(); std::transform(strMethod.begin(), strMethod.end(), strMethod.begin(), tolower); @@ -124,7 +124,7 @@ static void loadControllers(const Json::Value &controllers) } if (!controller["filters"].isNull()) { - for (auto filter : controller["filters"]) + for (auto const &filter : controller["filters"]) { constraints.push_back(filter.asString()); } @@ -168,7 +168,7 @@ static void loadApp(const Json::Value &app) if (fileTypes.isArray() && !fileTypes.empty()) { std::vector types; - for (auto fileType : fileTypes) + for (auto const &fileType : fileTypes) { types.push_back(fileType.asString()); LOG_TRACE << "file type:" << types.back(); @@ -196,7 +196,7 @@ static void loadApp(const Json::Value &app) if (viewsPaths.isArray() && viewsPaths.size() > 0) { std::vector paths; - for (auto viewsPath : viewsPaths) + for (auto const &viewsPath : viewsPaths) { paths.push_back(viewsPath.asString()); LOG_TRACE << "views path:" << paths.back(); @@ -234,7 +234,7 @@ static void loadDbClients(const Json::Value &dbClients) if (!dbClients) return; #if USE_ORM - for (auto &client : dbClients) + for (auto const &client : dbClients) { auto type = client.get("rdbms", "postgresql").asString(); auto host = client.get("host", "127.0.0.1").asString(); @@ -262,7 +262,7 @@ static void loadListeners(const Json::Value &listeners) if (!listeners) return; LOG_TRACE << "Has " << listeners.size() << " listeners"; - for (auto listener : listeners) + for (auto const &listener : listeners) { auto addr = listener.get("address", "0.0.0.0").asString(); auto port = (uint16_t)listener.get("port", 0).asUInt(); diff --git a/lib/src/DrClassMap.cc b/lib/src/DrClassMap.cc index 81af8748..8eafe7bc 100755 --- a/lib/src/DrClassMap.cc +++ b/lib/src/DrClassMap.cc @@ -36,7 +36,7 @@ DrObjectBase *DrClassMap::newObject(const std::string &className) std::vector DrClassMap::getAllClassName() { std::vector ret; - for (auto iter : getMap()) + for (auto const &iter : getMap()) { ret.push_back(iter.first); } diff --git a/lib/src/HttpAppFrameworkImpl.cc b/lib/src/HttpAppFrameworkImpl.cc index 05f1f279..59b2e0c6 100755 --- a/lib/src/HttpAppFrameworkImpl.cc +++ b/lib/src/HttpAppFrameworkImpl.cc @@ -80,7 +80,7 @@ void HttpAppFrameworkImpl::enableDynamicViewsLoading(const std::vector= 2 && libpath[0] == '.' && libpath[1] == '/') || @@ -100,7 +100,7 @@ void HttpAppFrameworkImpl::enableDynamicViewsLoading(const std::vector &types) { - for (auto type : types) + for (auto const &type : types) { _fileTypeSet.insert(type); } @@ -264,7 +264,7 @@ void HttpAppFrameworkImpl::run() _running = true; //Create db clients - for (auto &fun : _dbFuncs) + for (auto const &fun : _dbFuncs) { fun(); } @@ -276,7 +276,7 @@ void HttpAppFrameworkImpl::run() std::vector> servers; std::vector> loopThreads; _httpCtrlsRouter.init(); - for (auto listener : _listeners) + for (auto const &listener : _listeners) { LOG_TRACE << "thread num=" << _threadNum; #ifdef __linux__ @@ -414,7 +414,7 @@ void HttpAppFrameworkImpl::doFilters(const std::vector &filters, if (!filters.empty()) { filterPtrs = std::make_shared>>(); - for (auto &filter : filters) + for (auto const &filter : filters) { auto _object = std::shared_ptr(DrClassMap::newObject(filter)); auto _filter = std::dynamic_pointer_cast(_object); diff --git a/lib/src/HttpControllersRouter.cc b/lib/src/HttpControllersRouter.cc index 9c3e9648..f957c0b1 100644 --- a/lib/src/HttpControllersRouter.cc +++ b/lib/src/HttpControllersRouter.cc @@ -102,7 +102,7 @@ void HttpControllersRouter::addHttpPath(const std::string &path, { if (validMethods.size() > 0) { - for (auto method : validMethods) + for (auto const &method : validMethods) { router._binders[method] = binderInfo; } @@ -121,7 +121,7 @@ void HttpControllersRouter::addHttpPath(const std::string &path, router.pathParameterPattern = pathParameterPattern; if (validMethods.size() > 0) { - for (auto method : validMethods) + for (auto const &method : validMethods) { router._binders[method] = binderInfo; } @@ -251,7 +251,7 @@ void HttpControllersRouter::doControllerHandler(const CtrlBinderPtr &ctrlBinderP if (ctrlBinderPtr->queryParametersPlaces.size() > 0) { auto qureyPara = req->getParameters(); - for (auto parameter : qureyPara) + for (auto const ¶meter : qureyPara) { if (ctrlBinderPtr->queryParametersPlaces.find(parameter.first) != ctrlBinderPtr->queryParametersPlaces.end()) @@ -264,7 +264,7 @@ void HttpControllersRouter::doControllerHandler(const CtrlBinderPtr &ctrlBinderP } } std::list paraList; - for (auto p : params) + for (auto &p : params)///Use reference { LOG_TRACE << p; paraList.push_back(std::move(p)); diff --git a/lib/src/HttpRequestImpl.cc b/lib/src/HttpRequestImpl.cc index 03748595..c099e9c4 100755 --- a/lib/src/HttpRequestImpl.cc +++ b/lib/src/HttpRequestImpl.cc @@ -125,7 +125,7 @@ void HttpRequestImpl::appendToBuffer(MsgBuffer *output) const if (_parameters.size() != 0) { output->append("?"); - for (auto p : _parameters) + for (auto const &p : _parameters) { output->append(p.first); output->append("="); diff --git a/lib/src/HttpResponseImpl.cc b/lib/src/HttpResponseImpl.cc index 70df9ef6..12ecd643 100755 --- a/lib/src/HttpResponseImpl.cc +++ b/lib/src/HttpResponseImpl.cc @@ -345,9 +345,7 @@ void HttpResponseImpl::makeHeaderString(const std::shared_ptr &head } } - for (auto it = _headers.begin(); - it != _headers.end(); - ++it) + for (auto it = _headers.begin(); it != _headers.end(); ++it) { headerStringPtr->append(it->first); headerStringPtr->append(": "); diff --git a/lib/src/HttpSimpleControllersRouter.cc b/lib/src/HttpSimpleControllersRouter.cc index 3e6a60ef..21ecffb1 100644 --- a/lib/src/HttpSimpleControllersRouter.cc +++ b/lib/src/HttpSimpleControllersRouter.cc @@ -29,7 +29,7 @@ void HttpSimpleControllersRouter::registerHttpSimpleController(const std::string std::lock_guard guard(_simpCtrlMutex); std::vector validMethods; std::vector filters; - for (auto &filterOrMethod : filtersAndMethods) + for (auto const &filterOrMethod : filtersAndMethods) { if (filterOrMethod.type() == typeid(std::string)) { @@ -57,7 +57,7 @@ void HttpSimpleControllersRouter::registerHttpSimpleController(const std::string if (validMethods.size() > 0) { iterm._validMethodsFlags.resize(Invalid, 0); - for (auto method : validMethods) + for (auto const &method : validMethods) { iterm._validMethodsFlags[method] = 1; } diff --git a/lib/src/SharedLibManager.cc b/lib/src/SharedLibManager.cc index fdcbcf83..fee8c848 100755 --- a/lib/src/SharedLibManager.cc +++ b/lib/src/SharedLibManager.cc @@ -77,7 +77,7 @@ SharedLibManager::~SharedLibManager() } void SharedLibManager::managerLibs() { - for (auto libPath : _libPaths) + for (auto const &libPath : _libPaths) { forEachFileIn(libPath, [=](const std::string &filename, const struct stat &st) { auto pos = filename.rfind("."); diff --git a/lib/src/Utilities.cc b/lib/src/Utilities.cc index 4f6310b3..9e431ee7 100755 --- a/lib/src/Utilities.cc +++ b/lib/src/Utilities.cc @@ -42,7 +42,7 @@ static inline bool is_base64(unsigned char c) bool isInteger(const std::string &str) { - for (auto c : str) + for (auto const &c : str) { if (c > '9' || c < '0') return false; diff --git a/orm_lib/inc/drogon/orm/Mapper.h b/orm_lib/inc/drogon/orm/Mapper.h index 86f2ac50..25e0fcf5 100644 --- a/orm_lib/inc/drogon/orm/Mapper.h +++ b/orm_lib/inc/drogon/orm/Mapper.h @@ -468,7 +468,7 @@ inline std::vector Mapper::findBy(const Criteria &criteria) noexcept(false binder.exec(); //exec may be throw exception; } std::vector ret; - for (auto row : r) + for (auto const &row : r) { ret.push_back(T(row)); } @@ -498,7 +498,7 @@ inline void Mapper::findBy(const Criteria &criteria, criteria.outputArgs(binder); binder >> [=](const Result &r) { std::vector ret; - for (auto row : r) + for (auto const &row : r) { ret.push_back(T(row)); } @@ -530,7 +530,7 @@ inline std::future> Mapper::findFutureBy(const Criteria &crite std::shared_ptr>> prom = std::make_shared>>(); binder >> [=](const Result &r) { std::vector ret; - for (auto row : r) + for (auto const &row : r) { ret.push_back(T(row)); } @@ -641,7 +641,7 @@ inline void Mapper::insert(T &obj) noexcept(false) std::string sql = "insert into "; sql += T::tableName; sql += " ("; - for (auto colName : T::insertColumns()) + for (auto const &colName : T::insertColumns()) { sql += colName; sql += ","; @@ -688,7 +688,7 @@ inline void Mapper::insert(const T &obj, std::string sql = "insert into "; sql += T::tableName; sql += " ("; - for (auto colName : T::insertColumns()) + for (auto const &colName : T::insertColumns()) { sql += colName; sql += ","; @@ -731,7 +731,7 @@ inline std::future Mapper::insertFuture(const T &obj) noexcept std::string sql = "insert into "; sql += T::tableName; sql += " ("; - for (auto colName : T::insertColumns()) + for (auto const &colName : T::insertColumns()) { sql += colName; sql += ","; @@ -781,7 +781,7 @@ inline size_t Mapper::update(const T &obj) noexcept(false) std::string sql = "update "; sql += T::tableName; sql += " set "; - for (auto colName : obj.updateColumns()) + for (auto const &colName : obj.updateColumns()) { sql += colName; sql += " = $?,"; @@ -814,7 +814,7 @@ inline void Mapper::update(const T &obj, std::string sql = "update "; sql += T::tableName; sql += " set "; - for (auto colName : obj.updateColumns()) + for (auto const &colName : obj.updateColumns()) { sql += colName; sql += " = $?,"; @@ -840,7 +840,7 @@ inline std::future Mapper::updateFuture(const T &obj) noexcept std::string sql = "update "; sql += T::tableName; sql += " set "; - for (auto colName : obj.updateColumns()) + for (auto const &colName : obj.updateColumns()) { sql += colName; sql += " = $?,"; diff --git a/orm_lib/inc/drogon/orm/SqlBinder.h b/orm_lib/inc/drogon/orm/SqlBinder.h index 674f1e38..1fdd51fe 100644 --- a/orm_lib/inc/drogon/orm/SqlBinder.h +++ b/orm_lib/inc/drogon/orm/SqlBinder.h @@ -160,7 +160,7 @@ class CallbackHolder : public CallbackHolderBase run(nullptr, true); return; } - for (auto row : result) + for (auto const &row : result) { run(&row, false); } diff --git a/orm_lib/src/DbClientImpl.cc b/orm_lib/src/DbClientImpl.cc index 696c0958..e7bb954d 100644 --- a/orm_lib/src/DbClientImpl.cc +++ b/orm_lib/src/DbClientImpl.cc @@ -97,7 +97,7 @@ DbClientImpl::DbClientImpl(const std::string &connInfo, const size_t connNum, Cl DbClientImpl::~DbClientImpl() noexcept { std::lock_guard lock(_connectionsMutex); - for (auto &conn : _connections) + for (auto const &conn : _connections) { conn->disconnect(); } diff --git a/orm_lib/src/TransactionImpl.cc b/orm_lib/src/TransactionImpl.cc index 9e8c9536..549ebecc 100644 --- a/orm_lib/src/TransactionImpl.cc +++ b/orm_lib/src/TransactionImpl.cc @@ -228,7 +228,7 @@ void TransactionImpl::execNewTask() } catch (...) { - for (auto &cmd : _sqlCmdBuffer) + for (auto const &cmd : _sqlCmdBuffer) { if (cmd._exceptCb) { diff --git a/orm_lib/src/mysql_impl/MysqlConnection.cc b/orm_lib/src/mysql_impl/MysqlConnection.cc index 73529237..522c2ea2 100644 --- a/orm_lib/src/mysql_impl/MysqlConnection.cc +++ b/orm_lib/src/mysql_impl/MysqlConnection.cc @@ -50,7 +50,7 @@ MysqlConnection::MysqlConnection(trantor::EventLoop *loop, const std::string &co auto tmpStr = std::regex_replace(connInfo, r, "="); std::string host, user, passwd, dbname, port; auto keyValues = splitString(tmpStr, " "); - for (auto &kvs : keyValues) + for (auto const &kvs : keyValues) { auto kv = splitString(kvs, "="); assert(kv.size() == 2); diff --git a/orm_lib/src/mysql_impl/test/test1.cc b/orm_lib/src/mysql_impl/test/test1.cc index 47de5d2c..e7f88aa5 100644 --- a/orm_lib/src/mysql_impl/test/test1.cc +++ b/orm_lib/src/mysql_impl/test/test1.cc @@ -26,8 +26,8 @@ int main() *clientPtr << "select * from users where id!=139 order by id" << Mode::Blocking >> [](const Result &r) { std::cout << "rows:" << r.size() << std::endl; std::cout << "column num:" << r.columns() << std::endl; - - for (auto row : r) + + for (auto const &row : r) { std::cout << "id=" << row["id"].as() << std::endl; } @@ -50,7 +50,7 @@ int main() [](const Result &r) { std::cout << "rows:" << r.size() << std::endl; std::cout << "column num:" << r.columns() << std::endl; - for (auto row : r) + for (auto const &row : r) { std::cout << "user_id=" << row["user_id"].as() << " id=" << row["id"].as(); std::cout << " time=" << row["time"].as() << std::endl; diff --git a/orm_lib/src/postgresql_impl/test/test1.cc b/orm_lib/src/postgresql_impl/test/test1.cc index 470e09ea..c0fad0bd 100644 --- a/orm_lib/src/postgresql_impl/test/test1.cc +++ b/orm_lib/src/postgresql_impl/test/test1.cc @@ -23,9 +23,9 @@ int main() try { auto r = clientPtr->execSqlSync("select * from users where user_uuid=$1;", 1); - for (auto row : r) + for (auto const &row : r) { - for (auto f : row) + for (auto const &f : row) { std::cout << f.name() << " : " << f.as() << std::endl; } @@ -85,7 +85,7 @@ int main() try { auto r = f.get(); - for (auto row : r) + for (auto const &row : r) { std::cout << "user_id:" << row["user_id"].as() << std::endl; } diff --git a/orm_lib/src/sqlite3_impl/Sqlite3Connection.cc b/orm_lib/src/sqlite3_impl/Sqlite3Connection.cc index 49a9fc4c..410a1424 100644 --- a/orm_lib/src/sqlite3_impl/Sqlite3Connection.cc +++ b/orm_lib/src/sqlite3_impl/Sqlite3Connection.cc @@ -53,7 +53,7 @@ Sqlite3Connection::Sqlite3Connection(trantor::EventLoop *loop, const std::string std::string host, user, passwd, dbname, port; auto keyValues = splitString(tmpStr, " "); std::string filename; - for (auto &kvs : keyValues) + for (auto const &kvs : keyValues) { auto kv = splitString(kvs, "="); assert(kv.size() == 2); diff --git a/orm_lib/src/sqlite3_impl/test/test1.cc b/orm_lib/src/sqlite3_impl/test/test1.cc index 3d0da05b..62a24a79 100644 --- a/orm_lib/src/sqlite3_impl/test/test1.cc +++ b/orm_lib/src/sqlite3_impl/test/test1.cc @@ -49,7 +49,7 @@ int main() LOG_DEBUG << "affected rows:" << r.affectedRows(); LOG_DEBUG << "select " << r.size() << " rows"; LOG_DEBUG << "id:" << r.insertId(); - for (auto row : r) + for (auto const &row : r) { LOG_DEBUG << "group_id:" << row["group_id"].as(); } diff --git a/trantor b/trantor index 4ba9e71d..52753c24 160000 --- a/trantor +++ b/trantor @@ -1 +1 @@ -Subproject commit 4ba9e71d070b6c6498b4f0c9fd8e66bdde97ed97 +Subproject commit 52753c24ba8b94a6ca1978905c5cdb2675576b07