forked from Mirrors/openclonk
Change C4ID constructors so string literals warn
parent
bc58aae0ff
commit
b600fab6b8
|
@ -58,8 +58,6 @@ const C4ID C4ID::Rivalry("RVLR");
|
|||
#endif
|
||||
|
||||
C4ID::C4ID(const std::string &s) { assign(s); }
|
||||
C4ID::C4ID(const char *s) { assign(s); }
|
||||
C4ID::C4ID(char *s) { assign(s); }
|
||||
|
||||
void C4ID::assign(const std::string &s)
|
||||
{
|
||||
|
|
|
@ -70,8 +70,9 @@ public:
|
|||
C4ID &operator =(const C4ID &other) { v = other.v; return *this; }
|
||||
|
||||
explicit C4ID(const std::string &s);
|
||||
explicit C4ID(char *s);
|
||||
DEPRECATED explicit C4ID(const char *s); // Only difference is deprecation; const char should get all inline constants, but not stuff ead into variables
|
||||
template<size_t N>
|
||||
DEPRECATED explicit C4ID(const char (&s)[N]) { assign(s); }
|
||||
|
||||
explicit inline C4ID(Handle i): v(i)
|
||||
{
|
||||
assert(v < names.size());
|
||||
|
|
Loading…
Reference in New Issue