Left: | ||
Right: |
LEFT | RIGHT |
---|---|
1 #include <cstdio> | 1 #include <cstdio> |
2 | 2 |
3 #include "ActiveFilter.h" | 3 #include "ActiveFilter.h" |
4 #include "StringScanner.h" | 4 #include "StringScanner.h" |
5 | 5 |
6 static const DependentString DEFAULT_DOMAIN(u""_str); | |
sergei
2017/03/20 17:07:02
What about putting it into anonymous namespace?
BT
Wladimir Palant
2017/03/21 10:09:58
Done.
| |
7 | |
8 namespace | 6 namespace |
9 { | 7 { |
8 const DependentString DEFAULT_DOMAIN(u""_str); | |
9 | |
10 OwnedString to_string(unsigned int i) | 10 OwnedString to_string(unsigned int i) |
11 { | 11 { |
12 char buffer[11]; | 12 char buffer[11]; |
13 int len = sprintf(buffer, "%u", i); | 13 int len = sprintf(buffer, "%u", i); |
14 | 14 |
15 OwnedString result(len); | 15 OwnedString result(len); |
16 for (String::size_type i = 0; i < len; i++) | 16 for (String::size_type i = 0; i < len; i++) |
17 result[i] = buffer[i]; | 17 result[i] = buffer[i]; |
18 return result; | 18 return result; |
19 } | 19 } |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
181 result.append(u'\n'); | 181 result.append(u'\n'); |
182 } | 182 } |
183 if (mLastHit) | 183 if (mLastHit) |
184 { | 184 { |
185 result.append(u"lastHit="_str); | 185 result.append(u"lastHit="_str); |
186 result.append(to_string(mLastHit)); | 186 result.append(to_string(mLastHit)); |
187 result.append(u'\n'); | 187 result.append(u'\n'); |
188 } | 188 } |
189 return result; | 189 return result; |
190 } | 190 } |
LEFT | RIGHT |