nodevalue: remove unnecessary vecs

This commit is contained in:
itsmattkc
2022-05-09 15:58:19 -07:00
parent b88e15b8cf
commit 616121ee7a
2 changed files with 12 additions and 10 deletions
-4
View File
@@ -34,10 +34,6 @@
namespace olive {
const QVector<NodeValue::Type> NodeValue::kNumber = {kFloat, kInt, kRational};
const QVector<NodeValue::Type> NodeValue::kBuffer = {kTexture, kSamples};
const QVector<NodeValue::Type> NodeValue::kVector = {kVec2, kVec3, kVec4};
QString NodeValue::ValueToString(Type data_type, const QVariant &value, bool value_is_a_key_track)
{
if (!value_is_a_key_track && data_type == kVec2) {
+12 -6
View File
@@ -184,10 +184,6 @@ public:
kDataTypeCount
};
static const QVector<Type> kNumber;
static const QVector<Type> kBuffer;
static const QVector<Type> kVector;
NodeValue() :
type_(kNone),
from_(nullptr),
@@ -295,12 +291,22 @@ public:
static bool type_is_numeric(NodeValue::Type type)
{
return kNumber.contains(type);
return type == kFloat
|| type == kInt
|| type == kRational;
}
static bool type_is_vector(NodeValue::Type type)
{
return kVector.contains(type);
return type == kVec2
|| type == kVec3
|| type == kVec4;
}
static bool type_is_buffer(NodeValue::Type type)
{
return type == kTexture
|| type == kSamples;
}
static int get_number_of_keyframe_tracks(Type type);