namespace-wrap the generator function block
All checks were successful
continuous-integration/drone/push Build is passing
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:
parent
2bab9e7afa
commit
7a133ab2dc
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user