mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2025-01-30 11:35:39 +00:00
SmallString: Add missing constructors/move operators
This commit is contained in:
parent
61783d4a34
commit
a9ee2a34d8
|
@ -243,12 +243,60 @@ public:
|
||||||
assign(move);
|
assign(move);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ALWAYS_INLINE SmallStackString(const SmallStackString& copy)
|
||||||
|
{
|
||||||
|
init();
|
||||||
|
assign(copy);
|
||||||
|
}
|
||||||
|
|
||||||
|
ALWAYS_INLINE SmallStackString(SmallStackString&& move)
|
||||||
|
{
|
||||||
|
init();
|
||||||
|
assign(move);
|
||||||
|
}
|
||||||
|
|
||||||
ALWAYS_INLINE SmallStackString(const std::string_view& sv)
|
ALWAYS_INLINE SmallStackString(const std::string_view& sv)
|
||||||
{
|
{
|
||||||
init();
|
init();
|
||||||
assign(sv);
|
assign(sv);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ALWAYS_INLINE SmallStackString& operator=(const SmallStringBase& copy)
|
||||||
|
{
|
||||||
|
assign(copy);
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
|
ALWAYS_INLINE SmallStackString& operator=(SmallStringBase&& move)
|
||||||
|
{
|
||||||
|
assign(move);
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
|
ALWAYS_INLINE SmallStackString& operator=(const SmallStackString& copy)
|
||||||
|
{
|
||||||
|
assign(copy);
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
|
ALWAYS_INLINE SmallStackString& operator=(SmallStackString&& move)
|
||||||
|
{
|
||||||
|
assign(move);
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
|
ALWAYS_INLINE SmallStackString& operator=(const std::string_view& sv)
|
||||||
|
{
|
||||||
|
assign(sv);
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
|
ALWAYS_INLINE SmallStackString& operator=(const char* str)
|
||||||
|
{
|
||||||
|
assign(str);
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
// Override the fromstring method
|
// Override the fromstring method
|
||||||
static SmallStackString from_format(const char* format, ...) printflike(1, 2);
|
static SmallStackString from_format(const char* format, ...) printflike(1, 2);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue