From a7f247bdee31ad512da961b8e3dd0a7757774898 Mon Sep 17 00:00:00 2001 From: eelke Date: Fri, 21 Jan 2022 18:54:50 +0100 Subject: [PATCH] Cleanup --- core/PasswordManager.h | 1 - pglab/ConnectionListModel.h | 1 - pglab/OpenDatabase.h | 3 --- pgsql/Pgsql_Value.cpp | 2 +- tests/pglabtests/tst_scopeguard.cpp | 9 --------- 5 files changed, 1 insertion(+), 15 deletions(-) diff --git a/core/PasswordManager.h b/core/PasswordManager.h index c20f95d..f5c7d34 100644 --- a/core/PasswordManager.h +++ b/core/PasswordManager.h @@ -1,7 +1,6 @@ #ifndef PASSWORDMANAGER_H #define PASSWORDMANAGER_H -#include "Expected.h" #include "KeyStrengthener.h" #include #include diff --git a/pglab/ConnectionListModel.h b/pglab/ConnectionListModel.h index fae909b..39f8764 100644 --- a/pglab/ConnectionListModel.h +++ b/pglab/ConnectionListModel.h @@ -7,7 +7,6 @@ #include #include "ConnectionConfig.h" -#include "Expected.h" #include #include #include diff --git a/pglab/OpenDatabase.h b/pglab/OpenDatabase.h index f445e5e..0d4946e 100644 --- a/pglab/OpenDatabase.h +++ b/pglab/OpenDatabase.h @@ -30,9 +30,6 @@ public: using OpenDatabaseSPtr = std::shared_ptr; static OpenDatabaseSPtr createOpenDatabase(const ConnectionConfig &cfg); -// using on_createResult_callback = std::function>)>; -// void asyncCreateOpenDatabase(const ConnectionConfig &cfg, on_createResult_callback); - OpenDatabase(const OpenDatabase &) = delete; OpenDatabase& operator=(const OpenDatabase &) = delete; ~OpenDatabase(); diff --git a/pgsql/Pgsql_Value.cpp b/pgsql/Pgsql_Value.cpp index 966f194..4a740ed 100644 --- a/pgsql/Pgsql_Value.cpp +++ b/pgsql/Pgsql_Value.cpp @@ -83,7 +83,7 @@ Value::operator int64_t() const if (m_val == nullptr) return 0LL; - const int len = std::strlen(m_val); + const int len = std::strlen(m_val); if (len > 0) { char *endptr = nullptr; int64_t result = std::strtoll(m_val, &endptr, 10); diff --git a/tests/pglabtests/tst_scopeguard.cpp b/tests/pglabtests/tst_scopeguard.cpp index cab3621..0267588 100644 --- a/tests/pglabtests/tst_scopeguard.cpp +++ b/tests/pglabtests/tst_scopeguard.cpp @@ -53,12 +53,3 @@ TEST(ScopeGuard, SCOPE_EXIT_macro_2) ASSERT_THAT(result, Eq(true)); } - - - -//TEST(expected, get_when_valid_returns_value) -//{ -// Expected v = getAnswerToEverything(); -// ASSERT_THAT(v.get(), Eq(42)); -//} -