Skip to content

Commit 19b584f

Browse files
committed
rename
1 parent dc13b32 commit 19b584f

File tree

4 files changed

+19
-17
lines changed

4 files changed

+19
-17
lines changed

include/cppredis/cpp_redis_net.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#include <thread>
55
#include <atomic>
66
#include "traits.hpp"
7-
#include "unit.hpp"
7+
#include "redis_unit.hpp"
88
#include "cpp_redis_response.hpp"
99

1010
namespace cpp_redis {

include/cppredis/cpp_redis_request.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#include <algorithm>
55
#include <map>
66
#include <vector>
7-
#include "unit.hpp"
7+
#include "redis_unit.hpp"
88
#include "cpp_define.h"
99

1010
namespace cpp_redis {

include/cppredis/unit.hpp renamed to include/cppredis/redis_unit.hpp

+12-11
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
#ifndef unit_h__
2-
#define unit_h__
1+
#ifndef redis_unit_h__
2+
#define redis_unit_h__
33
#include <sstream>
44
#include <regex>
55
#include <chrono>
66
#include <tuple>
7-
#include "traits.hpp"
7+
#include "redis_traits.hpp"
88

99
namespace cpp_redis {
1010
namespace unit {
@@ -110,23 +110,23 @@ namespace cpp_redis {
110110
return std::move(ostr.str());
111111
}
112112

113-
static int string_to_int(std::string && str)
113+
static int string_to_int(std::string&& str)
114114
{
115-
if (str.empty()){
115+
if (str.empty()) {
116116
return INT_MAX;
117117
}
118118

119119
int value;
120120
std::istringstream istr(str);
121-
istr >>value;
121+
istr >> value;
122122
return value;
123123
}
124124

125125
static int64_t get_time_stamp()
126126
{
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 =
128128
std::chrono::time_point_cast<std::chrono::seconds>(std::chrono::system_clock::now());
129-
129+
130130
auto tmp = std::chrono::duration_cast<std::chrono::seconds>(tp.time_since_epoch());
131131
return tmp.count();
132132
}
@@ -159,8 +159,8 @@ namespace cpp_redis {
159159

160160
}
161161

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) {
164164
int arr[] = { (std::forward<F>(func)(args),0)... };
165165
}
166166

@@ -196,4 +196,5 @@ namespace cpp_redis {
196196
}
197197
}
198198
}
199-
#endif // unit_h__
199+
200+
#endif // redis_unit_h__

third_paty/traits.hpp renamed to third_paty/redis_traits.hpp

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
#ifndef traits_h__
2-
#define traits_h__
1+
#ifndef redis_traits_h__
2+
#define redis_traits_h__
3+
34
#include <type_traits>
45
#include <vector>
56
#include <map>
@@ -10,7 +11,7 @@
1011
#include <cstddef>
1112

1213

13-
namespace cpp_redis{
14+
namespace cpp_redis {
1415
namespace traits {
1516
template< class T >
1617
struct is_signed_intergral_like : std::integral_constant < bool,
@@ -212,4 +213,4 @@ namespace cpp_redis{
212213

213214
}//traits
214215
}//cpp_redis
215-
#endif // traits_h__
216+
#endif // redis_traits_h__

0 commit comments

Comments
 (0)