diff options
| author | Marco Bubke <[email protected]> | 2024-05-12 22:13:03 +0200 |
|---|---|---|
| committer | Tim Jenssen <[email protected]> | 2024-06-10 09:18:34 +0000 |
| commit | a7309597fa945842a321e600aca28ab076bfe53b (patch) | |
| tree | 73e54bd0223bd585a83b1e09c023ce1d4cebda61 /src/libs/sqlite/sqlstatementbuilder.h | |
| parent | c463807dda427b25e2a5f4a3638e73facdbf2302 (diff) | |
Utils: Optimize smallstring a little more
For string with a larger area we use spend a little bit memory on less
execution time.
Change-Id: I261ada4120de974ce40daaa7f0922af4dd115996
Reviewed-by: Tim Jenssen <[email protected]>
Diffstat (limited to 'src/libs/sqlite/sqlstatementbuilder.h')
| -rw-r--r-- | src/libs/sqlite/sqlstatementbuilder.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/libs/sqlite/sqlstatementbuilder.h b/src/libs/sqlite/sqlstatementbuilder.h index 3e202572c9b..6d496ce1342 100644 --- a/src/libs/sqlite/sqlstatementbuilder.h +++ b/src/libs/sqlite/sqlstatementbuilder.h @@ -19,10 +19,10 @@ public: SqlStatementBuilder(Utils::SmallStringView m_sqlTemplate); void bindEmptyText(Utils::SmallString &&name); - void bind(Utils::SmallString &&name, Utils::SmallString &&text); - void bind(Utils::SmallString &&name, const Utils::SmallStringVector &textVector); - void bind(Utils::SmallString &&name, int value); - void bind(Utils::SmallString &&name, const std::vector<int> &integerVector); + void bind(Utils::SmallStringView name, Utils::SmallStringView text); + void bind(Utils::SmallStringView name, const Utils::SmallStringVector &textVector); + void bind(Utils::SmallStringView name, int value); + void bind(Utils::SmallStringView name, const std::vector<int> &integerVector); void bindWithInsertTemplateParameters(Utils::SmallString &&name, const Utils::SmallStringVector &columns); void bindWithUpdateTemplateParameters(Utils::SmallString &&name, @@ -56,8 +56,8 @@ protected: Utils::SmallString sqlTemplate); private: - Utils::BasicSmallString<510> m_sqlTemplate; - mutable Utils::BasicSmallString<510> m_sqlStatement; + Utils::BasicSmallString<496> m_sqlTemplate; + mutable Utils::BasicSmallString<496> m_sqlStatement; mutable std::vector<BindingPair> m_bindings; }; |
