From 58819e501f2705a7d1dd678eb0112e97697e4366 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Tue, 1 May 2018 11:59:15 +0200 Subject: Remove unnecessary dependency 'fmt' --- src/Database.cpp | 6 ++---- src/Signature.cpp | 4 ++-- 2 files changed, 4 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/Database.cpp b/src/Database.cpp index aa852f6..8cca298 100644 --- a/src/Database.cpp +++ b/src/Database.cpp @@ -8,7 +8,6 @@ #include "../include/odhtdb/Log.hpp" #include #include -#include #include #include #include @@ -105,8 +104,7 @@ namespace odhtdb /*.proxy_server = */"", /*.push_node_id = */"" }); - fmt::MemoryWriter portStr; - portStr << port; + auto portStr = to_string(port); node.bootstrap(bootstrapNodeAddr, portStr.c_str()); // TODO: Make this work for multiple threads initializing database at same time @@ -388,7 +386,7 @@ namespace odhtdb return nullptr; } - void Database::addUser(const DatabaseNode &nodeInfo, LocalUser *userToPerformActionWith, const string &userToAddName, const Signature::PublicKey &userToAddPublicKey, Group *groupToAddUserTo) + void Database::addUser(const DatabaseNode &nodeInfo, const LocalUser *userToPerformActionWith, const string &userToAddName, const Signature::PublicKey &userToAddPublicKey, Group *groupToAddUserTo) { auto groupWithAddUserRights = getGroupWithRightsToAddUserToGroup(userToPerformActionWith->getGroups(), groupToAddUserTo); if(!groupWithAddUserRights) diff --git a/src/Signature.cpp b/src/Signature.cpp index 9f44ad2..af04017 100644 --- a/src/Signature.cpp +++ b/src/Signature.cpp @@ -10,7 +10,7 @@ namespace odhtdb { namespace Signature { - PublicKey PublicKey::ZERO("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", PUBLIC_KEY_NUM_BYTES); + const PublicKey PublicKey::ZERO("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", PUBLIC_KEY_NUM_BYTES); PublicKey::PublicKey(const char *_data, size_t size) { @@ -64,7 +64,7 @@ namespace odhtdb return bin2hex(data, PUBLIC_KEY_NUM_BYTES); } - PrivateKey PrivateKey::ZERO("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", PRIVATE_KEY_NUM_BYTES); + const PrivateKey PrivateKey::ZERO("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", PRIVATE_KEY_NUM_BYTES); PrivateKey::PrivateKey(const char *_data, size_t size) { -- cgit v1.2.3