Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(98)

Side by Side Diff: third_party/WebKit/Source/platform/inspector_protocol/String16STL.h

Issue 2098523002: Fix some issues found by coverity scans on Node.js (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef String16STL_h 5 #ifndef String16STL_h
6 #define String16STL_h 6 #define String16STL_h
7 7
8 #include <cstdlib> 8 #include <cstdlib>
9 #include <cstring> 9 #include <cstring>
10 #include <stdint.h> 10 #include <stdint.h>
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 } 129 }
130 return hash_code; 130 return hash_code;
131 } 131 }
132 132
133 private: 133 private:
134 static std::string intToString(int); 134 static std::string intToString(int);
135 static std::string doubleToString(double); 135 static std::string doubleToString(double);
136 // presubmit: allow wstring 136 // presubmit: allow wstring
137 wstring m_impl; 137 wstring m_impl;
138 mutable bool has_hash = false; 138 mutable bool has_hash = false;
139 mutable std::size_t hash_code; 139 mutable std::size_t hash_code = 0;
140 }; 140 };
141 141
142 static inline bool isSpaceOrNewline(UChar c) 142 static inline bool isSpaceOrNewline(UChar c)
143 { 143 {
144 return false; 144 return false;
145 } 145 }
146 146
147 class String16Builder { 147 class String16Builder {
148 public: 148 public:
149 String16Builder() { } 149 String16Builder() { }
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 public: 234 public:
235 String() {}; 235 String() {};
236 String(const String16& other) {}; 236 String(const String16& other) {};
237 operator String16() const { return String16(); }; 237 operator String16() const { return String16(); };
238 }; 238 };
239 } // namespace WTF 239 } // namespace WTF
240 240
241 using String = WTF::String; 241 using String = WTF::String;
242 242
243 #endif // !defined(String16STL_h) 243 #endif // !defined(String16STL_h)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698