Merge branch 'master' into jgrpp
# Conflicts: # src/industry_cmd.cpp # src/landscape.cpp # src/object_cmd.cpp # src/rail_cmd.cpp # src/script/api/script_tile.cpp # src/table/settings/difficulty_settings.ini # src/table/settings/world_settings.ini # src/terraform_cmd.cpp # src/tilearea_type.h # src/tree_cmd.cpp # src/tree_cmd.h # src/tree_gui.cpp # src/water_cmd.cpp
This commit is contained in:
@@ -905,9 +905,9 @@ int strnatcmp(const char *s1, const char *s2, bool ignore_garbage_at_front)
|
||||
|
||||
#ifdef WITH_UNISCRIBE
|
||||
|
||||
/* static */ StringIterator *StringIterator::Create()
|
||||
/* static */ std::unique_ptr<StringIterator> StringIterator::Create()
|
||||
{
|
||||
return new UniscribeStringIterator();
|
||||
return std::make_unique<UniscribeStringIterator>();
|
||||
}
|
||||
|
||||
#elif defined(WITH_ICU_I18N)
|
||||
@@ -1061,9 +1061,9 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
/* static */ StringIterator *StringIterator::Create()
|
||||
/* static */ std::unique_ptr<StringIterator> StringIterator::Create()
|
||||
{
|
||||
return new IcuStringIterator();
|
||||
return std::make_unique<IcuStringIterator>();
|
||||
}
|
||||
|
||||
#else
|
||||
@@ -1172,17 +1172,17 @@ public:
|
||||
};
|
||||
|
||||
#if defined(WITH_COCOA) && !defined(STRGEN) && !defined(SETTINGSGEN)
|
||||
/* static */ StringIterator *StringIterator::Create()
|
||||
/* static */ std::unique_ptr<StringIterator> StringIterator::Create()
|
||||
{
|
||||
StringIterator *i = OSXStringIterator::Create();
|
||||
std::unique_ptr<StringIterator> i = OSXStringIterator::Create();
|
||||
if (i != nullptr) return i;
|
||||
|
||||
return new DefaultStringIterator();
|
||||
return std::make_unique<DefaultStringIterator>();
|
||||
}
|
||||
#else
|
||||
/* static */ StringIterator *StringIterator::Create()
|
||||
/* static */ std::unique_ptr<StringIterator> StringIterator::Create()
|
||||
{
|
||||
return new DefaultStringIterator();
|
||||
return std::make_unique<DefaultStringIterator>();
|
||||
}
|
||||
#endif /* defined(WITH_COCOA) && !defined(STRGEN) && !defined(SETTINGSGEN) */
|
||||
|
||||
|
Reference in New Issue
Block a user