Skip to content

Commit d415300

Browse files
committed
Move one-line implementation of UniValue::read() to header.
1 parent 52e85b3 commit d415300

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

include/univalue.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#define __UNIVALUE_H__
88

99
#include <stdint.h>
10+
#include <string.h>
1011

1112
#include <string>
1213
#include <vector>
@@ -137,7 +138,7 @@ class UniValue {
137138
unsigned int indentLevel = 0) const;
138139

139140
bool read(const char *raw, size_t len);
140-
bool read(const char *raw);
141+
bool read(const char *raw) { return read(raw, strlen(raw)); }
141142
bool read(const std::string& rawStr) {
142143
return read(rawStr.data(), rawStr.size());
143144
}

lib/univalue_read.cpp

-3
Original file line numberDiff line numberDiff line change
@@ -449,6 +449,3 @@ bool UniValue::read(const char *raw, size_t size)
449449
return true;
450450
}
451451

452-
bool UniValue::read(const char *raw) {
453-
return read(raw, strlen(raw));
454-
}

0 commit comments

Comments
 (0)