Mark CommonValue as deprecated to generate warnings in old code
This commit is contained in:
@@ -3,6 +3,8 @@
|
|||||||
#include "CommonValue.h"
|
#include "CommonValue.h"
|
||||||
#include "Engine/Scripting/ScriptingObject.h"
|
#include "Engine/Scripting/ScriptingObject.h"
|
||||||
|
|
||||||
|
PRAGMA_DISABLE_DEPRECATION_WARNINGS
|
||||||
|
|
||||||
const CommonValue CommonValue::Zero(0.0f);
|
const CommonValue CommonValue::Zero(0.0f);
|
||||||
const CommonValue CommonValue::One(1.0f);
|
const CommonValue CommonValue::One(1.0f);
|
||||||
const CommonValue CommonValue::Null(static_cast<void*>(nullptr));
|
const CommonValue CommonValue::Null(static_cast<void*>(nullptr));
|
||||||
@@ -176,3 +178,5 @@ void CommonValue::UnlinkObject()
|
|||||||
{
|
{
|
||||||
AsObject->Deleted.Unbind<CommonValue, &CommonValue::OnObjectDeleted>(this);
|
AsObject->Deleted.Unbind<CommonValue, &CommonValue::OnObjectDeleted>(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
PRAGMA_ENABLE_DEPRECATION_WARNINGS
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ class ScriptingObject;
|
|||||||
/// Container for value that can have different types
|
/// Container for value that can have different types
|
||||||
/// [Deprecated on 31.07.2020, expires on 31.07.2022]
|
/// [Deprecated on 31.07.2020, expires on 31.07.2022]
|
||||||
/// </summary>
|
/// </summary>
|
||||||
struct FLAXENGINE_API CommonValue
|
struct DEPRECATED("Use Variant.") FLAXENGINE_API CommonValue
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -5,7 +5,6 @@
|
|||||||
#include "Engine/Core/Collections/HashFunctions.h"
|
#include "Engine/Core/Collections/HashFunctions.h"
|
||||||
#include "Engine/Core/Collections/Dictionary.h"
|
#include "Engine/Core/Collections/Dictionary.h"
|
||||||
#include "Engine/Content/Asset.h"
|
#include "Engine/Content/Asset.h"
|
||||||
#include "Engine/Content/AssetReference.h"
|
|
||||||
#include "Engine/Core/Log.h"
|
#include "Engine/Core/Log.h"
|
||||||
#include "Engine/Core/Math/Mathd.h"
|
#include "Engine/Core/Math/Mathd.h"
|
||||||
#include "Engine/Core/Math/BoundingBox.h"
|
#include "Engine/Core/Math/BoundingBox.h"
|
||||||
@@ -23,7 +22,6 @@
|
|||||||
#include "Engine/Scripting/ScriptingObject.h"
|
#include "Engine/Scripting/ScriptingObject.h"
|
||||||
#include "Engine/Scripting/ManagedCLR/MClass.h"
|
#include "Engine/Scripting/ManagedCLR/MClass.h"
|
||||||
#include "Engine/Scripting/ManagedCLR/MCore.h"
|
#include "Engine/Scripting/ManagedCLR/MCore.h"
|
||||||
#include "Engine/Scripting/ManagedCLR/MCore.h"
|
|
||||||
#include "Engine/Scripting/ManagedCLR/MUtils.h"
|
#include "Engine/Scripting/ManagedCLR/MUtils.h"
|
||||||
#include "Engine/Utilities/Crc.h"
|
#include "Engine/Utilities/Crc.h"
|
||||||
#include "Engine/Utilities/StringConverter.h"
|
#include "Engine/Utilities/StringConverter.h"
|
||||||
@@ -889,6 +887,7 @@ Variant::Variant(const Span<byte>& v)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
PRAGMA_DISABLE_DEPRECATION_WARNINGS
|
||||||
Variant::Variant(const CommonValue& value)
|
Variant::Variant(const CommonValue& value)
|
||||||
: Variant()
|
: Variant()
|
||||||
{
|
{
|
||||||
@@ -956,6 +955,7 @@ Variant::Variant(const CommonValue& value)
|
|||||||
CRASH;
|
CRASH;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
PRAGMA_ENABLE_DEPRECATION_WARNINGS
|
||||||
|
|
||||||
Variant::~Variant()
|
Variant::~Variant()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -663,6 +663,7 @@ void ParticleEffect::Deserialize(DeserializeStream& stream, ISerializeModifier*
|
|||||||
// [Deprecated on 25.11.2018, expires on 25.11.2022]
|
// [Deprecated on 25.11.2018, expires on 25.11.2022]
|
||||||
if (modifier->EngineBuild < 6197)
|
if (modifier->EngineBuild < 6197)
|
||||||
{
|
{
|
||||||
|
PRAGMA_DISABLE_DEPRECATION_WARNINGS
|
||||||
const auto& overrides = overridesMember->value;
|
const auto& overrides = overridesMember->value;
|
||||||
ASSERT(overrides.IsArray());
|
ASSERT(overrides.IsArray());
|
||||||
_parametersOverrides.EnsureCapacity(_parametersOverrides.Count() + overrides.Size());
|
_parametersOverrides.EnsureCapacity(_parametersOverrides.Count() + overrides.Size());
|
||||||
@@ -700,6 +701,7 @@ void ParticleEffect::Deserialize(DeserializeStream& stream, ISerializeModifier*
|
|||||||
p.Value = Variant(JsonTools::GetCommonValue(mValue->value));
|
p.Value = Variant(JsonTools::GetCommonValue(mValue->value));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
PRAGMA_ENABLE_DEPRECATION_WARNINGS
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -284,6 +284,7 @@ DateTime JsonTools::GetDateTime(const Value& value)
|
|||||||
return DateTime(value.GetInt64());
|
return DateTime(value.GetInt64());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
PRAGMA_DISABLE_DEPRECATION_WARNINGS
|
||||||
CommonValue JsonTools::GetCommonValue(const Value& value)
|
CommonValue JsonTools::GetCommonValue(const Value& value)
|
||||||
{
|
{
|
||||||
// [Deprecated on 31.07.2020, expires on 31.07.2022]
|
// [Deprecated on 31.07.2020, expires on 31.07.2022]
|
||||||
@@ -363,3 +364,4 @@ CommonValue JsonTools::GetCommonValue(const Value& value)
|
|||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
PRAGMA_ENABLE_DEPRECATION_WARNINGS
|
||||||
|
|||||||
@@ -244,6 +244,7 @@ void JsonWriter::Matrix(const ::Matrix& value)
|
|||||||
EndObject();
|
EndObject();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
PRAGMA_DISABLE_DEPRECATION_WARNINGS
|
||||||
void JsonWriter::CommonValue(const ::CommonValue& value)
|
void JsonWriter::CommonValue(const ::CommonValue& value)
|
||||||
{
|
{
|
||||||
// [Deprecated on 31.07.2020, expires on 31.07.2022]
|
// [Deprecated on 31.07.2020, expires on 31.07.2022]
|
||||||
@@ -319,6 +320,7 @@ void JsonWriter::CommonValue(const ::CommonValue& value)
|
|||||||
|
|
||||||
EndObject();
|
EndObject();
|
||||||
}
|
}
|
||||||
|
PRAGMA_ENABLE_DEPRECATION_WARNINGS
|
||||||
|
|
||||||
void JsonWriter::Transform(const ::Transform& value)
|
void JsonWriter::Transform(const ::Transform& value)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -105,6 +105,7 @@ void ReadStream::Read(String& data, int16 lock)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
PRAGMA_DISABLE_DEPRECATION_WARNINGS
|
||||||
void ReadStream::Read(CommonValue& data)
|
void ReadStream::Read(CommonValue& data)
|
||||||
{
|
{
|
||||||
// [Deprecated on 31.07.2020, expires on 31.07.2022]
|
// [Deprecated on 31.07.2020, expires on 31.07.2022]
|
||||||
@@ -233,6 +234,7 @@ void ReadStream::Read(CommonValue& data)
|
|||||||
default: CRASH;
|
default: CRASH;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
PRAGMA_ENABLE_DEPRECATION_WARNINGS
|
||||||
|
|
||||||
void ReadStream::Read(VariantType& data)
|
void ReadStream::Read(VariantType& data)
|
||||||
{
|
{
|
||||||
@@ -547,10 +549,12 @@ void ReadStream::ReadString(String* data, int16 lock)
|
|||||||
Read(*data, lock);
|
Read(*data, lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
PRAGMA_DISABLE_DEPRECATION_WARNINGS
|
||||||
void ReadStream::ReadCommonValue(CommonValue* data)
|
void ReadStream::ReadCommonValue(CommonValue* data)
|
||||||
{
|
{
|
||||||
Read(*data);
|
Read(*data);
|
||||||
}
|
}
|
||||||
|
PRAGMA_ENABLE_DEPRECATION_WARNINGS
|
||||||
|
|
||||||
void ReadStream::ReadVariantType(VariantType* data)
|
void ReadStream::ReadVariantType(VariantType* data)
|
||||||
{
|
{
|
||||||
@@ -735,6 +739,7 @@ void WriteStream::Write(const StringAnsiView& data, int8 lock)
|
|||||||
WriteUint8((uint8)((uint8)data[i] ^ lock));
|
WriteUint8((uint8)((uint8)data[i] ^ lock));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
PRAGMA_DISABLE_DEPRECATION_WARNINGS
|
||||||
void WriteStream::Write(const CommonValue& data)
|
void WriteStream::Write(const CommonValue& data)
|
||||||
{
|
{
|
||||||
// [Deprecated on 31.07.2020, expires on 31.07.2022]
|
// [Deprecated on 31.07.2020, expires on 31.07.2022]
|
||||||
@@ -797,6 +802,7 @@ void WriteStream::Write(const CommonValue& data)
|
|||||||
default: CRASH;
|
default: CRASH;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
PRAGMA_ENABLE_DEPRECATION_WARNINGS
|
||||||
|
|
||||||
void WriteStream::Write(const VariantType& data)
|
void WriteStream::Write(const VariantType& data)
|
||||||
{
|
{
|
||||||
@@ -997,10 +1003,12 @@ void WriteStream::WriteStringAnsi(const StringAnsiView& data, int8 lock)
|
|||||||
Write(data, lock);
|
Write(data, lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
PRAGMA_DISABLE_DEPRECATION_WARNINGS
|
||||||
void WriteStream::WriteCommonValue(const CommonValue& data)
|
void WriteStream::WriteCommonValue(const CommonValue& data)
|
||||||
{
|
{
|
||||||
Write(data);
|
Write(data);
|
||||||
}
|
}
|
||||||
|
PRAGMA_ENABLE_DEPRECATION_WARNINGS
|
||||||
|
|
||||||
void WriteStream::WriteVariantType(const VariantType& data)
|
void WriteStream::WriteVariantType(const VariantType& data)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user