7 Commits

Author SHA1 Message Date
Mathias Parnaudeau
4880fab063 COMMON: Use appropriate equals() in BaseString
Remove a useless creation of a BaseString object with a C string in
comparison operators of this class, because there is a function
equals() that accepts a C string in parameter.
2020-11-06 21:21:05 +00:00
Thierry Crozat
e5bfe63087 COMMON: Merge the String and U32String destructors
The call to decRefCount has been moved to the destructor
of the base class BaseString.

Note that BaseString only exists for the purpose of being able
to reuse code for our String and U32String implementations. As
such it is not meant to be used polymorphically and its
destructor does not need to be virtual (with the overhead that
this generates). And to ensure that it is not used in a
polymorphic way, the destructor is declared protected.
2020-11-05 23:52:19 +00:00
Thierry Crozat
f18ee89b27 JANITORIAL: Fix indentation issues 2020-11-05 23:52:19 +00:00
Vladimir Serbinenko
54b0b4ac4c COMMON: Restore old behaviour for appending char to string
Appending \0 to string and expecting it to be just dropped is
still an invalid behaviour but it already happened in 2 engines, so
restore old behaviour, at least for now
2020-11-03 11:19:20 +01:00
Paul Gilbert
7775330954 COMMON: Ignore string erase calls when the passed length is zero 2020-11-02 21:49:05 -08:00
Vladimir Serbinenko
0d7ab6cd64 COMMON: compilation fix on some older compilers 2020-11-01 14:58:46 +01:00
Vladimir Serbinenko
29cfa7bb0f COMMON: Merge code for str.cpp and ustr.cpp
Most of the code in str.cpp and ustr.cpp is actually the same. Do some
template magic to merge them.
2020-10-31 14:05:30 +01:00