1
0
forked from 0ad/0ad

Remove L10n::DictionaryDeleter added in d6ddc4f3ac.

Patch By: phosit
Differential Revision: https://code.wildfiregames.com/D4817
This was SVN commit r27197.
This commit is contained in:
Vladislav Belov 2022-11-04 20:52:28 +00:00
parent cde8b7fae8
commit eea6c21d40
2 changed files with 3 additions and 13 deletions

View File

@ -134,13 +134,8 @@ icu::DateFormat* CreateDateTimeInstance(const L10n::DateTimeType& type, const ic
} // anonymous namespace
void L10n::DictionaryDeleter::operator()(tinygettext::Dictionary* dictionary)
{
delete dictionary;
}
L10n::L10n()
: m_Dictionary(new tinygettext::Dictionary())
: m_Dictionary(std::make_unique<tinygettext::Dictionary>())
{
// Determine whether or not to print tinygettext messages to the standard
// error output, which it tinygettext's default behavior, but not ours.
@ -567,7 +562,7 @@ Status L10n::ReloadChangedFile(const VfsPath& path)
void L10n::LoadDictionaryForCurrentLocale()
{
m_Dictionary.reset(new tinygettext::Dictionary());
m_Dictionary = std::make_unique<tinygettext::Dictionary>();
VfsPaths filenames;
if (m_UseLongStrings)

View File

@ -480,11 +480,6 @@ public:
Status ReloadChangedFile(const VfsPath& path);
private:
struct DictionaryDeleter
{
void operator()(tinygettext::Dictionary* dictionary);
};
/**
* Dictionary that contains the translations for the
* @link L10n::GetCurrentLocale() current locale@endlink and the matching
@ -492,7 +487,7 @@ private:
*
* @sa LoadDictionaryForCurrentLocale()
*/
std::unique_ptr<tinygettext::Dictionary, DictionaryDeleter> m_Dictionary;
std::unique_ptr<tinygettext::Dictionary> m_Dictionary;
/**
* Locale that the game is currently using.