Skip to content

Commit 77299dd

Browse files
committed
Drop StaticString
I doubt anyone uses this, and it is an implementation detail. There must be a better way to handle this. Maybe an injected implementation?
1 parent b441568 commit 77299dd

File tree

1 file changed

+0
-29
lines changed

1 file changed

+0
-29
lines changed

include/json/thing.h

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -113,22 +113,6 @@ Json::Thing obj_value(Json::objectThing); // {}
113113
Thing(double value);
114114
Thing(const char* value); ///< Copy til first 0. (NULL causes to seg-fault.)
115115
Thing(const char* begin, const char* end); ///< Copy all, incl zeroes.
116-
/** \brief Constructs a value from a static string.
117-
118-
* Like other value string constructor but do not duplicate the string for
119-
* internal storage. The given string must remain alive after the call to this
120-
* constructor.
121-
* \note This works only for null-terminated strings. (We cannot change the
122-
* size of this class, so we have nowhere to store the length,
123-
* which might be computed later for various operations.)
124-
*
125-
* Example of usage:
126-
* \code
127-
* static StaticString foo("some text");
128-
* Json::Thing aThing(foo);
129-
* \endcode
130-
*/
131-
Thing(const StaticString& value);
132116
Thing(const String& value); ///< Copy data() til size(). Embedded zeroes too.
133117
Thing(bool value);
134118
/// Deep copy.
@@ -265,19 +249,6 @@ Json::Thing obj_value(Json::objectThing); // {}
265249
/// that name.
266250
/// \param key may contain embedded nulls.
267251
const Thing& operator[](const String& key) const;
268-
/** \brief Access an object value by name, create a null member if it does not
269-
exist.
270-
271-
* If the object has no entry for that name, then the member name used to store
272-
* the new entry is not duplicated.
273-
* Example of use:
274-
* \code
275-
* Json::Thing object;
276-
* static const StaticString code("code");
277-
* object[code] = 1234;
278-
* \endcode
279-
*/
280-
Thing& operator[](const StaticString& key);
281252
/// Return the member named key if it exist, defaultThing otherwise.
282253
/// \note deep copy
283254
Thing get(const char* key, const Thing& defaultThing) const;

0 commit comments

Comments
 (0)