partial reload from json working, but edges make problems

This commit is contained in:
Sebastian
2024-11-03 15:15:42 +01:00
parent 7bdd68bdcc
commit bfd8bb192e
5 changed files with 46 additions and 26 deletions
+4 -2
View File
@@ -2,6 +2,7 @@
#include "raylib.h"
#include <cmath>
#include <iostream>
#include "nlohmann/json.hpp"
@@ -107,12 +108,13 @@ namespace VISEQ::VMATH{
};
template<typename T>
void to_json(json& j, const Vec2D<T> V){
void to_json(json& j, const Vec2D<T>& V){
j = json{{"x",V.x},{"y",V.y}};
}
template<typename T>
void from_json(const json& j, Vec2D<T> V){
void from_json(const json& j, Vec2D<T>& V){
std::cout << "Vec2D" << std::endl;
j.at("x").get_to(V.x);
j.at("y").get_to(V.y);
}