diff options
author | Marco Bubke <[email protected]> | 2021-05-19 18:50:51 +0200 |
---|---|---|
committer | Marco Bubke <[email protected]> | 2021-05-31 16:43:11 +0000 |
commit | 8603eb5ba9be13c8d2fc97c2b98da473d52e9c19 (patch) | |
tree | 90bc66b89c75c7bb916a566610b737ae38437c21 /src/libs/sqlite/sqliteindex.h | |
parent | 7b330d3496c3c2083ee4fa212a3413f0b139f983 (diff) |
Utils: Remove std::initializer_list contructor
If you write
Utils::SmallStringView view;
Utils::SmallString text{view};
it selects the std::initializer_list contructor. Not the didicated
constructore. It is much to easy to get it wrong so it is better
to make it explicit.
Change-Id: I4240eaf1f39cf71d37df4480fea1ecfa3ea83cb0
Reviewed-by: Qt CI Bot <[email protected]>
Reviewed-by: Thomas Hartmann <[email protected]>
Diffstat (limited to 'src/libs/sqlite/sqliteindex.h')
-rw-r--r-- | src/libs/sqlite/sqliteindex.h | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/src/libs/sqlite/sqliteindex.h b/src/libs/sqlite/sqliteindex.h index 61c2a3041c4..11d83541af1 100644 --- a/src/libs/sqlite/sqliteindex.h +++ b/src/libs/sqlite/sqliteindex.h @@ -57,18 +57,17 @@ public: checkTableName(); checkColumns(); - return {"CREATE ", - m_indexType == IndexType::Unique ? "UNIQUE " : "", - "INDEX IF NOT EXISTS index_", - m_tableName, - "_", - m_columnNames.join("_"), - " ON ", - m_tableName, - "(", - m_columnNames.join(", "), - ")" - }; + return Utils::SmallString::join({"CREATE ", + m_indexType == IndexType::Unique ? "UNIQUE " : "", + "INDEX IF NOT EXISTS index_", + m_tableName, + "_", + m_columnNames.join("_"), + " ON ", + m_tableName, + "(", + m_columnNames.join(", "), + ")"}); } void checkTableName() const |