1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-25 22:42:04 +02:00

vcmi: use std::optional

This commit is contained in:
Konstantin
2023-04-16 20:42:56 +03:00
parent 0d35606a44
commit 7a5775a9f9
135 changed files with 552 additions and 585 deletions

View File

@@ -99,10 +99,10 @@ public:
void tryRequestIdentifier(const std::string & type, const JsonNode & name, const std::function<void(si32)> & callback);
/// get identifier immediately. If identifier is not know and not silent call will result in error message
boost::optional<si32> getIdentifier(const std::string & scope, const std::string & type, const std::string & name, bool silent = false);
boost::optional<si32> getIdentifier(const std::string & type, const JsonNode & name, bool silent = false);
boost::optional<si32> getIdentifier(const JsonNode & name, bool silent = false);
boost::optional<si32> getIdentifier(const std::string & scope, const std::string & fullName, bool silent = false);
std::optional<si32> getIdentifier(const std::string & scope, const std::string & type, const std::string & name, bool silent = false);
std::optional<si32> getIdentifier(const std::string & type, const JsonNode & name, bool silent = false);
std::optional<si32> getIdentifier(const JsonNode & name, bool silent = false);
std::optional<si32> getIdentifier(const std::string & scope, const std::string & fullName, bool silent = false);
/// registers new object
void registerObject(const std::string & scope, const std::string & type, const std::string & name, si32 identifier);