mirror of
https://github.com/geode-sdk/geode.git
synced 2024-11-14 19:15:05 -05:00
fix build
This commit is contained in:
parent
9ed55c4e7b
commit
e8ef9b79c8
3 changed files with 9 additions and 8 deletions
|
@ -121,7 +121,7 @@ namespace geode {
|
|||
* @param name The argument name
|
||||
*/
|
||||
template <class T>
|
||||
Result<T, std::string_view> parseLaunchArgument(std::string_view const name) const {
|
||||
Result<T> parseLaunchArgument(std::string_view const name) const {
|
||||
auto str = this->getLaunchArgument(name);
|
||||
if (!str.has_value()) {
|
||||
return Err("Launch argument '{}' not found", name);
|
||||
|
|
|
@ -15,14 +15,14 @@
|
|||
|
||||
template <>
|
||||
struct matjson::Serialize<cocos2d::ccColor3B> {
|
||||
static geode::Result<cocos2d::ccColor3B, std::string> fromJson(Value const& value);
|
||||
static Value toJson(cocos2d::ccColor3B const& value);
|
||||
static geode::Result<cocos2d::ccColor3B> GEODE_DLL fromJson(Value const& value);
|
||||
static Value GEODE_DLL toJson(cocos2d::ccColor3B const& value);
|
||||
};
|
||||
|
||||
template <>
|
||||
struct matjson::Serialize<cocos2d::ccColor4B> {
|
||||
static geode::Result<cocos2d::ccColor4B, std::string> fromJson(Value const& value);
|
||||
static Value toJson(cocos2d::ccColor4B const& value);
|
||||
static geode::Result<cocos2d::ccColor4B> GEODE_DLL fromJson(Value const& value);
|
||||
static Value GEODE_DLL toJson(cocos2d::ccColor4B const& value);
|
||||
};
|
||||
|
||||
// operators for CC geometry
|
||||
|
@ -930,10 +930,10 @@ namespace std {
|
|||
};
|
||||
|
||||
template <typename T>
|
||||
struct std::hash<geode::WeakRef<T>> {
|
||||
struct hash<geode::WeakRef<T>> {
|
||||
size_t operator()(geode::WeakRef<T> const& ref) const {
|
||||
// the explicit template argument is needed here because it would otherwise cast to WeakRef and recurse
|
||||
return hash<std::shared_ptr<geode::WeakRefController>>{}(ref.m_controller);
|
||||
return std::hash<std::shared_ptr<geode::WeakRefController>>{}(ref.m_controller);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
@ -41,7 +41,8 @@ namespace geode::utils::file {
|
|||
|
||||
template <class T>
|
||||
Result<> writeToJson(std::filesystem::path const& path, T const& data) {
|
||||
GEODE_UNWRAP(writeString(path, matjson::Value(data).dump()));
|
||||
GEODE_UNWRAP_INTO(auto str, matjson::Value(data).dump());
|
||||
GEODE_UNWRAP(writeString(path, str));
|
||||
return Ok();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue