diff options
-rw-r--r-- | project2/sql/sqlHandleAsVariableType.cpp | 4 | ||||
-rw-r--r-- | project2/sql/sqlHandleAsVariableType.h | 2 | ||||
-rw-r--r-- | project2/sql/sqlTest.cpp | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/project2/sql/sqlHandleAsVariableType.cpp b/project2/sql/sqlHandleAsVariableType.cpp index ac1ea3b..a692a40 100644 --- a/project2/sql/sqlHandleAsVariableType.cpp +++ b/project2/sql/sqlHandleAsVariableType.cpp @@ -5,8 +5,8 @@ void HandleAsVariableType::null() { variable = Null(); } -void HandleAsVariableType::string(const char * c, size_t l) { - variable = Glib::ustring(c, c + l); +void HandleAsVariableType::string(const std::string_view s) { + variable = Glib::ustring(s.begin(), s.end()); } void HandleAsVariableType::integer(int64_t i) { variable = i; diff --git a/project2/sql/sqlHandleAsVariableType.h b/project2/sql/sqlHandleAsVariableType.h index 97b63c9..5bf38c3 100644 --- a/project2/sql/sqlHandleAsVariableType.h +++ b/project2/sql/sqlHandleAsVariableType.h @@ -7,7 +7,7 @@ class DLL_PUBLIC HandleAsVariableType : public DB::HandleField { public: void null(); - void string(const char * c, size_t l); + void string(const std::string_view l); void integer(int64_t i); void boolean(bool i); void floatingpoint(double d); diff --git a/project2/sql/sqlTest.cpp b/project2/sql/sqlTest.cpp index 1bb6678..1eac20e 100644 --- a/project2/sql/sqlTest.cpp +++ b/project2/sql/sqlTest.cpp @@ -37,8 +37,8 @@ class HandleDoCompare : public DB::HandleField { void null() { throw CantCompareNulls(); } - void string(const char *c , size_t l) { - doTest(Glib::ustring(c, c + l)); + void string(const std::string_view s) { + doTest(Glib::ustring(s.begin(), s.end())); } void integer(int64_t val) { doTest(val); |