Make definitionLocation optional

This commit is contained in:
JohnnyMorganz 2024-07-13 10:06:16 +02:00
parent 5208aba6ac
commit 39dd9e09aa

View file

@ -499,11 +499,11 @@ struct ClassType
Tags tags; Tags tags;
std::shared_ptr<ClassUserData> userData; std::shared_ptr<ClassUserData> userData;
ModuleName definitionModuleName; ModuleName definitionModuleName;
Location definitionLocation; std::optional<Location> definitionLocation;
std::optional<TableIndexer> indexer; std::optional<TableIndexer> indexer;
ClassType(Name name, Props props, std::optional<TypeId> parent, std::optional<TypeId> metatable, Tags tags, ClassType(Name name, Props props, std::optional<TypeId> parent, std::optional<TypeId> metatable, Tags tags,
std::shared_ptr<ClassUserData> userData, ModuleName definitionModuleName, Location definitionLocation) std::shared_ptr<ClassUserData> userData, ModuleName definitionModuleName, std::optional<Location> definitionLocation)
: name(name) : name(name)
, props(props) , props(props)
, parent(parent) , parent(parent)
@ -516,7 +516,8 @@ struct ClassType
} }
ClassType(Name name, Props props, std::optional<TypeId> parent, std::optional<TypeId> metatable, Tags tags, ClassType(Name name, Props props, std::optional<TypeId> parent, std::optional<TypeId> metatable, Tags tags,
std::shared_ptr<ClassUserData> userData, ModuleName definitionModuleName, Location definitionLocation, std::optional<TableIndexer> indexer) std::shared_ptr<ClassUserData> userData, ModuleName definitionModuleName, std::optional<Location> definitionLocation,
std::optional<TableIndexer> indexer)
: name(name) : name(name)
, props(props) , props(props)
, parent(parent) , parent(parent)