Browse Source

UI: Remove legacy nlohmann workaround (Ubuntu 22.04)

derrod 1 year ago
parent
commit
b0e1eced04
2 changed files with 0 additions and 64 deletions
  1. 0 41
      UI/models/multitrack-video.hpp
  2. 0 23
      UI/update/models/whatsnew.hpp

+ 0 - 41
UI/models/multitrack-video.hpp

@@ -23,47 +23,6 @@
 
 #include <nlohmann/json.hpp>
 
-/* From whatsnew.hpp */
-#ifndef NLOHMANN_DEFINE_TYPE_INTRUSIVE
-#define NLOHMANN_DEFINE_TYPE_INTRUSIVE(Type, ...)                             \
-	friend void to_json(nlohmann::json &nlohmann_json_j,                  \
-			    const Type &nlohmann_json_t)                      \
-	{                                                                     \
-		NLOHMANN_JSON_EXPAND(                                         \
-			NLOHMANN_JSON_PASTE(NLOHMANN_JSON_TO, __VA_ARGS__))   \
-	}                                                                     \
-	friend void from_json(const nlohmann::json &nlohmann_json_j,          \
-			      Type &nlohmann_json_t)                          \
-	{                                                                     \
-		NLOHMANN_JSON_EXPAND(                                         \
-			NLOHMANN_JSON_PASTE(NLOHMANN_JSON_FROM, __VA_ARGS__)) \
-	}
-#endif
-
-#ifndef NLOHMANN_JSON_FROM_WITH_DEFAULT
-#define NLOHMANN_JSON_FROM_WITH_DEFAULT(v1) \
-	nlohmann_json_t.v1 =                \
-		nlohmann_json_j.value(#v1, nlohmann_json_default_obj.v1);
-#endif
-
-#ifndef NLOHMANN_DEFINE_TYPE_INTRUSIVE_WITH_DEFAULT
-#define NLOHMANN_DEFINE_TYPE_INTRUSIVE_WITH_DEFAULT(Type, ...)              \
-	friend void to_json(nlohmann::json &nlohmann_json_j,                \
-			    const Type &nlohmann_json_t)                    \
-	{                                                                   \
-		NLOHMANN_JSON_EXPAND(                                       \
-			NLOHMANN_JSON_PASTE(NLOHMANN_JSON_TO, __VA_ARGS__)) \
-	}                                                                   \
-	friend void from_json(const nlohmann::json &nlohmann_json_j,        \
-			      Type &nlohmann_json_t)                        \
-	{                                                                   \
-		Type nlohmann_json_default_obj;                             \
-		NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(                   \
-			NLOHMANN_JSON_FROM_WITH_DEFAULT, __VA_ARGS__))      \
-	}
-
-#endif
-
 /*
  * Support for (de-)serialising std::optional
  * From https://github.com/nlohmann/json/issues/1749#issuecomment-1731266676

+ 0 - 23
UI/update/models/whatsnew.hpp

@@ -21,29 +21,6 @@
 
 #include <nlohmann/json.hpp>
 
-/* Ubuntu 22.04 be damned. */
-#ifndef NLOHMANN_DEFINE_TYPE_INTRUSIVE_WITH_DEFAULT
-#define NLOHMANN_JSON_FROM_WITH_DEFAULT(v1) \
-	nlohmann_json_t.v1 =                \
-		nlohmann_json_j.value(#v1, nlohmann_json_default_obj.v1);
-
-#define NLOHMANN_DEFINE_TYPE_INTRUSIVE_WITH_DEFAULT(Type, ...)              \
-	friend void to_json(nlohmann::json &nlohmann_json_j,                \
-			    const Type &nlohmann_json_t)                    \
-	{                                                                   \
-		NLOHMANN_JSON_EXPAND(                                       \
-			NLOHMANN_JSON_PASTE(NLOHMANN_JSON_TO, __VA_ARGS__)) \
-	}                                                                   \
-	friend void from_json(const nlohmann::json &nlohmann_json_j,        \
-			      Type &nlohmann_json_t)                        \
-	{                                                                   \
-		Type nlohmann_json_default_obj;                             \
-		NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(                   \
-			NLOHMANN_JSON_FROM_WITH_DEFAULT, __VA_ARGS__))      \
-	}
-
-#endif
-
 /*
  * Support for (de-)serialising std::optional
  * Adapted from https://github.com/nlohmann/json/issues/1749#issuecomment-1555093802