diff options
| author | Dennis Brentjes <d.brentjes@gmail.com> | 2016-12-15 12:43:51 +0100 |
|---|---|---|
| committer | Dennis Brentjes <d.brentjes@gmail.com> | 2016-12-15 12:43:51 +0100 |
| commit | c4ea52a9db2945d724013af428e8fe32ee9b683a (patch) | |
| tree | 0c75bbb517f0129e4fdc7d6d810feea48f7ce82c | |
| parent | 0700ae054385610eef21ba673413811b1d9e4b64 (diff) | |
| download | cmix-c4ea52a9db2945d724013af428e8fe32ee9b683a.tar.gz cmix-c4ea52a9db2945d724013af428e8fe32ee9b683a.tar.bz2 cmix-c4ea52a9db2945d724013af428e8fe32ee9b683a.zip | |
"Nicer" solution to the private typedef problem.
Gcc doesn't even error on the private typedef access. So instead of
entering and exiting the public scope in the class definition, Just
add a template which forces deduction of the underlying type.
| -rw-r--r-- | node/node.hpp | 2 | ||||
| -rw-r--r-- | node/node_node.cpp | 4 |
2 files changed, 2 insertions, 4 deletions
diff --git a/node/node.hpp b/node/node.hpp index de4e25d..d9e16d4 100644 --- a/node/node.hpp +++ b/node/node.hpp @@ -92,9 +92,7 @@ class Node typedef std::map<std::string, SSLSenderReceiver> ClientConnections; ClientConnections clients; -public: typedef std::map<std::string, CMixClientData> ClientData; -private: ClientData data; typedef std::map<std::string, std::queue<std::string>> ClientMessages; ClientMessages messages; diff --git a/node/node_node.cpp b/node/node_node.cpp index 56e883d..db1be1f 100644 --- a/node/node_node.cpp +++ b/node/node_node.cpp @@ -125,8 +125,8 @@ void fill_commitments_message(CMixContext& ctx, cmix_proto::Commitments& commits commits.set_ciphertext_commitment(commitment.data(), commitment.size()); } -template <typename T> -void fill_realtime_pre_message(CMixContext& ctx, cmix_proto::RealPre& realpre, T const& hs, T const& ms, Node::ClientData const& data) { +template <typename T, typename U> +void fill_realtime_pre_message(CMixContext& ctx, cmix_proto::RealPre& realpre, T const& hs, T const& ms, U const& data) { size_t len = get_group_element_array_size(&ctx); std::vector<char*> msv1(ms.size(), nullptr); |
