git.fiddlerwoaroof.com
Browse code

Centralize definition of octet_vector type

Ed Langley authored on 14/06/2017 20:42:44
Showing 5 changed files
... ...
@@ -22,10 +22,10 @@
22 22
 
23 23
 #include "sys_stdlib.h"
24 24
 #include "sys_time.h"
25
+#include "typealiases.h"
25 26
 
26 27
 int ipow (int base, int exp);
27 28
 time_t time_step (const time_t time, const int step);
28
-using octet_vector = std::vector<uint8_t>;
29 29
 
30 30
 class token_generator_ifc
31 31
 {
... ...
@@ -20,6 +20,7 @@
20 20
 #include "sys_stdlib.h"
21 21
 #include "sys_time.h"
22 22
 #include "test_util.h"
23
+#include "typealiases.h"
23 24
 
24 25
 class fake_stdlib : public stdlib_ifc
25 26
 {
... ...
@@ -20,6 +20,7 @@
20 20
 #include "token.h"
21 21
 #include "test_util.h"
22 22
 #include "generator.h"
23
+#include "typealiases.h"
23 24
 
24 25
 class mock_tokens : public tokens_ifc
25 26
 {
... ...
@@ -23,6 +23,7 @@
23 23
 #include "sys_fstream.h"
24 24
 #include "generator.h"
25 25
 #include "base32.h"
26
+#include "typealiases.h"
26 27
 
27 28
 class fake_user : public user_ifc
28 29
 {
... ...
@@ -103,7 +104,6 @@ public:
103 104
     }
104 105
 };
105 106
 
106
-using octet_vector = std::vector<uint8_t>;
107 107
 class fake_rand_with_specified_result : public random_source_ifc
108 108
 {
109 109
 private:
110 110
new file mode 100644
... ...
@@ -0,0 +1,8 @@
1
+#ifndef TYPEALIASEES_H_
2
+#define TYPEALIASEES_H_
3
+#include <vector>
4
+
5
+using octet_vector = typename std::vector<uint8_t>;
6
+
7
+
8
+#endif