mirror of
https://github.com/cuberite/SQLiteCpp.git
synced 2025-08-12 05:36:09 -04:00
Fix compilation: Revert "Use transparent comparator in mColumnNames to avoid creating std::string when comparing"
This commit is contained in:
parent
c7cffad617
commit
f70c9f7a7b
@ -78,9 +78,9 @@ public:
|
|||||||
Statement(const Statement&) = delete;
|
Statement(const Statement&) = delete;
|
||||||
Statement& operator=(const Statement&) = delete;
|
Statement& operator=(const Statement&) = delete;
|
||||||
|
|
||||||
|
// TODO: Change Statement move constructor to default
|
||||||
Statement(Statement&& aStatement) noexcept;
|
Statement(Statement&& aStatement) noexcept;
|
||||||
Statement& operator=(Statement&& aStatement) noexcept = default;
|
Statement& operator=(Statement&& aStatement) noexcept = default;
|
||||||
// TODO: Change Statement move constructor to default
|
|
||||||
|
|
||||||
/// Finalize and unregister the SQL query from the SQLite Database Connection.
|
/// Finalize and unregister the SQL query from the SQLite Database Connection.
|
||||||
/// The finalization will be done by the destructor of the last shared pointer
|
/// The finalization will be done by the destructor of the last shared pointer
|
||||||
@ -703,7 +703,7 @@ private:
|
|||||||
bool mbDone = false; //!< true when the last executeStep() had no more row to fetch
|
bool mbDone = false; //!< true when the last executeStep() had no more row to fetch
|
||||||
|
|
||||||
/// Map of columns index by name (mutable so getColumnIndex can be const)
|
/// Map of columns index by name (mutable so getColumnIndex can be const)
|
||||||
mutable std::map<std::string, int, std::less<>> mColumnNames;
|
mutable std::map<std::string, int> mColumnNames;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -275,7 +275,7 @@ int Statement::getColumnIndex(const char* apName) const
|
|||||||
for (int i = 0; i < mColumnCount; ++i)
|
for (int i = 0; i < mColumnCount; ++i)
|
||||||
{
|
{
|
||||||
const char* pName = sqlite3_column_name(getPreparedStatement(), i);
|
const char* pName = sqlite3_column_name(getPreparedStatement(), i);
|
||||||
mColumnNames.emplace(pName, i);
|
mColumnNames[pName] = i;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user