mirror of
https://github.com/allankoechke/soci.git
synced 2026-11-30 10:58:24 +00:00
Use range-based loops when possible
Run clang-tidy with modernize-loop-convert check to convert a few loops to a simpler and tidier form.
This commit is contained in:
@@ -542,12 +542,12 @@ TEST_CASE("PostgreSQL insert into ... returning", "[postgresql]")
|
||||
table_creator_for_test12 tableCreator(sql);
|
||||
|
||||
std::vector<long> ids(10);
|
||||
for (std::size_t i = 0; i != ids.size(); i++)
|
||||
for (long & id : ids)
|
||||
{
|
||||
long sid(0);
|
||||
std::string txt("abc");
|
||||
sql << "insert into soci_test(txt) values(:txt) returning sid", use(txt, "txt"), into(sid);
|
||||
ids[i] = sid;
|
||||
id = sid;
|
||||
}
|
||||
|
||||
std::vector<long> ids2(ids.size());
|
||||
|
||||
Reference in New Issue
Block a user