diff options
-rw-r--r-- | src/event.cpp | 16 | ||||
-rw-r--r-- | src/filters.cpp | 10 | ||||
-rw-r--r-- | src/nostr_service.cpp | 27 |
3 files changed, 9 insertions, 44 deletions
diff --git a/src/event.cpp b/src/event.cpp index 2df1c3a..cf6b117 100644 --- a/src/event.cpp +++ b/src/event.cpp @@ -1,24 +1,12 @@ #include <ctime> #include <openssl/evp.h> -#include <iomanip> -#include <sstream> -#include <string> #include <nlohmann/json.hpp> #include <openssl/sha.h> #include "nostr.hpp" -using nlohmann::json; -using std::hex; -using std::invalid_argument; -using std::make_shared; -using std::ostringstream; -using std::setw; -using std::setfill; -using std::shared_ptr; -using std::string; -using std::stringstream; -using std::time; +using namespace nlohmann; +using namespace std; namespace nostr { diff --git a/src/filters.cpp b/src/filters.cpp index 83756f9..af9960c 100644 --- a/src/filters.cpp +++ b/src/filters.cpp @@ -1,15 +1,9 @@ -#include <ctime> -#include <sstream> -#include <string> #include <nlohmann/json.hpp> #include "nostr.hpp" +using namespace nlohmann; +using namespace std; -using nlohmann::json; -using std::invalid_argument; -using std::stringstream; -using std::string; -using std::time; namespace nostr { diff --git a/src/nostr_service.cpp b/src/nostr_service.cpp index 3a59fa6..de40180 100644 --- a/src/nostr_service.cpp +++ b/src/nostr_service.cpp @@ -10,26 +10,9 @@ #include "nostr.hpp" #include "client/web_socket_client.hpp" -using nlohmann::json; -using std::async; -using std::exception; -using std::find_if; -using std::function; -using std::future; -using std::invalid_argument; -using std::lock_guard; -using std::make_shared; -using std::make_tuple; -using std::move; -using std::mutex; -using std::out_of_range; -using std::promise; -using std::shared_ptr; -using std::string; -using std::thread; -using std::tuple; -using std::unique_ptr; -using std::vector; +using namespace nlohmann; +using namespace std; +using namespace UUIDv4; namespace nostr { @@ -513,8 +496,8 @@ void NostrService::disconnect(string relay) string NostrService::generateSubscriptionId() { - UUIDv4::UUIDGenerator<std::mt19937_64> uuidGenerator; - UUIDv4::UUID uuid = uuidGenerator.getUUID(); + UUIDGenerator<std::mt19937_64> uuidGenerator; + UUID uuid = uuidGenerator.getUUID(); return uuid.bytes(); }; |