Skip to content

Commit

Permalink
remove unnecessary includes and type aliases
Browse files Browse the repository at this point in the history
  • Loading branch information
frtget committed Nov 21, 2023
1 parent 3d94b9d commit 3e2407d
Show file tree
Hide file tree
Showing 8 changed files with 7 additions and 12 deletions.
1 change: 0 additions & 1 deletion include/session/config/groups/info.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ extern "C" {

#include "../base.h"
#include "../profile_pic.h"
#include "../util.h"

LIBSESSION_EXPORT extern const size_t GROUP_INFO_NAME_MAX_LENGTH;
LIBSESSION_EXPORT extern const size_t GROUP_INFO_DESCRIPTION_MAX_LENGTH;
Expand Down
1 change: 0 additions & 1 deletion include/session/config/groups/keys.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
#include "../../config.hpp"
#include "../base.hpp"
#include "../namespaces.hpp"
#include "../profile_pic.hpp"
#include "members.hpp"

namespace session::config::groups {
Expand Down
4 changes: 2 additions & 2 deletions include/session/xed25519.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
#include <string>
#include <string_view>

namespace session::xed25519 {
#include "session/types.hpp"

using ustring_view = std::basic_string_view<unsigned char>;
namespace session::xed25519 {

/// XEd25519-signs a message given the curve25519 privkey and message.
std::array<unsigned char, 64> sign(
Expand Down
2 changes: 0 additions & 2 deletions src/config/contacts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,8 @@

#include "internal.hpp"
#include "session/config/contacts.h"
#include "session/config/error.h"
#include "session/export.h"
#include "session/types.hpp"
#include "session/util.hpp"

using namespace std::literals;
using namespace session::config;
Expand Down
1 change: 0 additions & 1 deletion src/config/groups/info.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#include "session/config/groups/info.h"
#include "session/export.h"
#include "session/types.hpp"
#include "session/util.hpp"

using namespace std::literals;

Expand Down
2 changes: 1 addition & 1 deletion src/xed25519.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ std::string pubkey(std::string_view curve25519_pubkey) {

} // namespace session::xed25519

using session::xed25519::ustring_view;
using session::ustring_view;

extern "C" {

Expand Down
2 changes: 1 addition & 1 deletion tests/test_xed25519.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include "session/xed25519.h"
#include "session/xed25519.hpp"

using session::xed25519::ustring_view;
using session::ustring_view;

constexpr std::array<unsigned char, 64> seed1{
0xfe, 0xcd, 0x9a, 0x60, 0x34, 0xbc, 0x9a, 0xba, 0x27, 0x39, 0x25, 0xde, 0xe7,
Expand Down
6 changes: 3 additions & 3 deletions tests/utils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
#include <string_view>
#include <vector>

#include "session/config/base.h"
#include "session/types.hpp"

using ustring = std::basic_string<unsigned char>;
using ustring_view = std::basic_string_view<unsigned char>;
using session::ustring;
using session::ustring_view;

inline ustring operator""_bytes(const char* x, size_t n) {
return {reinterpret_cast<const unsigned char*>(x), n};
Expand Down

0 comments on commit 3e2407d

Please sign in to comment.