mirror of
https://github.com/oven-sh/bun
synced 2026-02-17 14:22:01 +00:00
Delete unnecessary overloads
This commit is contained in:
@@ -224,13 +224,6 @@ BunString toStringRef(JSC::JSGlobalObject* globalObject, JSValue value)
|
||||
return { BunStringTag::WTFStringImpl, { .wtf = impl } };
|
||||
}
|
||||
|
||||
BunString toStringNonRef(WTF::String& wtfString)
|
||||
{
|
||||
if (wtfString.isEmpty())
|
||||
return { BunStringTag::Empty };
|
||||
|
||||
return { BunStringTag::WTFStringImpl, { .wtf = wtfString.impl() } };
|
||||
}
|
||||
BunString toStringNonRef(const WTF::String& wtfString)
|
||||
{
|
||||
if (wtfString.isEmpty())
|
||||
@@ -246,14 +239,6 @@ BunString toStringNonRef(WTF::StringImpl* wtfString)
|
||||
return { BunStringTag::WTFStringImpl, { .wtf = wtfString } };
|
||||
}
|
||||
|
||||
BunString toStringRef(WTF::String& wtfString)
|
||||
{
|
||||
if (wtfString.isEmpty())
|
||||
return { BunStringTag::Empty };
|
||||
|
||||
wtfString.impl()->ref();
|
||||
return { BunStringTag::WTFStringImpl, { .wtf = wtfString.impl() } };
|
||||
}
|
||||
BunString toStringRef(const WTF::String& wtfString)
|
||||
{
|
||||
if (wtfString.isEmpty())
|
||||
|
||||
@@ -299,14 +299,12 @@ BunString toString(const char* bytes, size_t length);
|
||||
// the same lifetime as the argument. Be very careful that the BunString is not used after the
|
||||
// WTF::String has gone out of scope.
|
||||
BunString toStringNonRef(JSC::JSGlobalObject* globalObject, JSC::JSValue value);
|
||||
BunString toStringNonRef(WTF::String& wtfString);
|
||||
BunString toStringNonRef(const WTF::String& wtfString);
|
||||
BunString toStringNonRef(WTF::StringImpl* wtfString);
|
||||
|
||||
// These functions increment the reference count on their argument. `deref` must be called later
|
||||
// on the return value to avoid a leak.
|
||||
BunString toStringRef(JSC::JSGlobalObject* globalObject, JSC::JSValue value);
|
||||
BunString toStringRef(WTF::String& wtfString);
|
||||
BunString toStringRef(const WTF::String& wtfString);
|
||||
BunString toStringRef(WTF::StringImpl* wtfString);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user