MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / canConvert

Method canConvert

source/core/StarJson.cpp:837–848  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

835}
836
837bool Json::canConvert(Type t) const {
838 if (type() == t)
839 return true;
840
841 if (t == Type::Null)
842 return true;
843
844 if ((type() == Type::Float || type() == Type::Int) && (t == Type::Float || t == Type::Int))
845 return true;
846
847 return false;
848}
849
850bool Json::isNull() const {
851 return type() == Type::Null;

Callers 10

constructSpawnProfileFunction · 0.80
readJsonMethod · 0.80
TreasureDatabaseMethod · 0.80
receiveMessageMethod · 0.80
triggerPickupEventsMethod · 0.80
shipWorldPromiseMethod · 0.80
BeamMiningToolMethod · 0.80
inputDescriptorFromJsonFunction · 0.80
loadJsonMethod · 0.80
jsonToSizeFunction · 0.80

Calls 1

typeFunction · 0.50

Tested by

no test coverage detected