File tree 4 files changed +19
-17
lines changed
4 files changed +19
-17
lines changed Original file line number Diff line number Diff line change 4
4
#include < thread>
5
5
#include < atomic>
6
6
#include " traits.hpp"
7
- #include " unit .hpp"
7
+ #include " redis_unit .hpp"
8
8
#include " cpp_redis_response.hpp"
9
9
10
10
namespace cpp_redis {
Original file line number Diff line number Diff line change 4
4
#include < algorithm>
5
5
#include < map>
6
6
#include < vector>
7
- #include " unit .hpp"
7
+ #include " redis_unit .hpp"
8
8
#include " cpp_define.h"
9
9
10
10
namespace cpp_redis {
Original file line number Diff line number Diff line change 1
- #ifndef unit_h__
2
- #define unit_h__
1
+ #ifndef redis_unit_h__
2
+ #define redis_unit_h__
3
3
#include < sstream>
4
4
#include < regex>
5
5
#include < chrono>
6
6
#include < tuple>
7
- #include " traits .hpp"
7
+ #include " redis_traits .hpp"
8
8
9
9
namespace cpp_redis {
10
10
namespace unit {
@@ -110,23 +110,23 @@ namespace cpp_redis {
110
110
return std::move (ostr.str ());
111
111
}
112
112
113
- static int string_to_int (std::string && str)
113
+ static int string_to_int (std::string&& str)
114
114
{
115
- if (str.empty ()){
115
+ if (str.empty ()) {
116
116
return INT_MAX;
117
117
}
118
118
119
119
int value;
120
120
std::istringstream istr (str);
121
- istr >>value;
121
+ istr >> value;
122
122
return value;
123
123
}
124
124
125
125
static int64_t get_time_stamp ()
126
126
{
127
- std::chrono::time_point<std::chrono::system_clock, std::chrono::seconds> tp =
127
+ std::chrono::time_point<std::chrono::system_clock, std::chrono::seconds> tp =
128
128
std::chrono::time_point_cast<std::chrono::seconds>(std::chrono::system_clock::now ());
129
-
129
+
130
130
auto tmp = std::chrono::duration_cast<std::chrono::seconds>(tp.time_since_epoch ());
131
131
return tmp.count ();
132
132
}
@@ -159,8 +159,8 @@ namespace cpp_redis {
159
159
160
160
}
161
161
162
- template <typename F,typename ...Args>
163
- void for_each_args (F&&func,Args...args){
162
+ template <typename F, typename ...Args>
163
+ void for_each_args (F&& func, Args...args) {
164
164
int arr[] = { (std::forward<F>(func)(args),0 )... };
165
165
}
166
166
@@ -196,4 +196,5 @@ namespace cpp_redis {
196
196
}
197
197
}
198
198
}
199
- #endif // unit_h__
199
+
200
+ #endif // redis_unit_h__
Original file line number Diff line number Diff line change 1
- #ifndef traits_h__
2
- #define traits_h__
1
+ #ifndef redis_traits_h__
2
+ #define redis_traits_h__
3
+
3
4
#include < type_traits>
4
5
#include < vector>
5
6
#include < map>
10
11
#include < cstddef>
11
12
12
13
13
- namespace cpp_redis {
14
+ namespace cpp_redis {
14
15
namespace traits {
15
16
template < class T >
16
17
struct is_signed_intergral_like : std::integral_constant < bool ,
@@ -212,4 +213,4 @@ namespace cpp_redis{
212
213
213
214
}// traits
214
215
}// cpp_redis
215
- #endif // traits_h__
216
+ #endif // redis_traits_h__
You can’t perform that action at this time.
0 commit comments