Index: compiled/filter/ActiveFilter.cpp |
=================================================================== |
--- a/compiled/filter/ActiveFilter.cpp |
+++ b/compiled/filter/ActiveFilter.cpp |
@@ -18,27 +18,16 @@ |
#include <cstdio> |
#include "ActiveFilter.h" |
#include "../StringScanner.h" |
namespace |
{ |
const DependentString DEFAULT_DOMAIN(u""_str); |
- |
- OwnedString to_string(unsigned int i) |
- { |
- char buffer[11]; |
- int len = sprintf(buffer, "%u", i); |
- |
- OwnedString result(len); |
- for (String::size_type i = 0; i < len; i++) |
- result[i] = buffer[i]; |
- return result; |
- } |
} |
ActiveFilter::ActiveFilter(Type type, const String& text, bool ignoreTrailingDot) |
: Filter(type, text), mDisabled(false), mHitCount(0), mLastHit(0), |
mIgnoreTrailingDot(ignoreTrailingDot) |
{ |
} |
@@ -189,19 +178,19 @@ OwnedString ActiveFilter::Serialize() co |
{ |
/* TODO this is very inefficient */ |
OwnedString result(Filter::Serialize()); |
if (mDisabled) |
result.append(u"disabled=true\n"_str); |
if (mHitCount) |
{ |
result.append(u"hitCount="_str); |
- result.append(to_string(mHitCount)); |
+ result.append(mHitCount); |
result.append(u'\n'); |
} |
if (mLastHit) |
{ |
result.append(u"lastHit="_str); |
- result.append(to_string(mLastHit)); |
+ result.append(mLastHit); |
result.append(u'\n'); |
} |
return result; |
} |