namespace-wrap the generator function block
All checks were successful
continuous-integration/drone/push Build is passing

* the purpose is to subdivide the global scope
* use 'fortuna' as the top-level namespace
* use 'generator' namespace for the generator functions
* wrap the entire file after includes
This commit is contained in:
surtur 2021-11-01 09:23:22 +01:00
parent 2bab9e7afa
commit 7a133ab2dc
Signed by: wanderer
GPG Key ID: 19CE1EC1D9E0486D
2 changed files with 11 additions and 0 deletions

View File

@ -5,6 +5,9 @@
#include <tuple>
#include "generator.h"
namespace fortuna {
namespace generator {
using namespace std;
struct G_state{
@ -78,3 +81,6 @@ auto generate_random_data(G_state G, uint n) -> tuple<string, G_state> {
return {r, G};
};
} // namespace generator
} // namespace fortuna

View File

@ -5,6 +5,9 @@
#include <cstring>
#include <tuple>
namespace fortuna {
namespace generator {
struct G_state;
/* initializes generator */
@ -21,4 +24,6 @@ auto generate_blocks(G_state G, int k_blocks) -> std::tuple<std::string, G_state
/* returns output of 0 <= n <= 2^20 bytes */
auto generate_random_data(G_state G, int n) -> std::tuple<std::string, G_state>;
} //namespace generator
} //namespace fortuna
#endif//FORTUNA_GENERATOR_H