summaryrefslogtreecommitdiffstats
path: root/base/string_piece.h
diff options
context:
space:
mode:
Diffstat (limited to 'base/string_piece.h')
-rw-r--r--base/string_piece.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/base/string_piece.h b/base/string_piece.h
index 47d4968..5b4bf40 100644
--- a/base/string_piece.h
+++ b/base/string_piece.h
@@ -55,8 +55,14 @@ class StringPiece {
size_type length() const { return length_; }
bool empty() const { return length_ == 0; }
- void clear() { ptr_ = NULL; length_ = 0; }
- void set(const char* data, size_type len) { ptr_ = data; length_ = len; }
+ void clear() {
+ ptr_ = NULL;
+ length_ = 0;
+ }
+ void set(const char* data, size_type len) {
+ ptr_ = data;
+ length_ = len;
+ }
void set(const char* str) {
ptr_ = str;
length_ = str ? strlen(str) : 0;