Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Delta Between Two Patch Sets: compiled/ActiveFilter.cpp

Issue 29333474: Issue 4125 - [emscripten] Convert filter classes to C++ (Closed)
Left Patch Set: Properly determine ref_counted offset instead of assuming that it is zero Created March 14, 2017, 10:18 a.m.
Right Patch Set: Addressed comments from Patch Set 28 Created March 21, 2017, 10:04 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « compiled/ActiveFilter.h ('k') | compiled/BlockingFilter.h » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
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
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 }
LEFTRIGHT

Powered by Google App Engine
This is Rietveld