summaryrefslogtreecommitdiff
path: root/src/emscripten-optimizer/istring.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/emscripten-optimizer/istring.h')
-rw-r--r--src/emscripten-optimizer/istring.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/emscripten-optimizer/istring.h b/src/emscripten-optimizer/istring.h
index 87da87473..5a7d05162 100644
--- a/src/emscripten-optimizer/istring.h
+++ b/src/emscripten-optimizer/istring.h
@@ -35,7 +35,7 @@
namespace cashew {
struct IString {
- const char *str;
+ const char *str = nullptr;
static size_t hash_c(const char *str) { // see http://www.cse.yorku.ca/~oz/hash.html
unsigned int hash = 5381;
@@ -59,7 +59,7 @@ struct IString {
}
};
- IString() : str(nullptr) {}
+ IString() = default;
IString(const char *s, bool reuse=true) { // if reuse=true, then input is assumed to remain alive; not copied
assert(s);
set(s, reuse);
@@ -178,7 +178,7 @@ namespace cashew {
class IStringSet : public std::unordered_set<IString> {
std::vector<char> data;
public:
- IStringSet() {}
+ IStringSet() = default;
IStringSet(const char *init) { // comma-delimited list
int size = strlen(init) + 1;
data.resize(size);