mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-26 11:05:58 +01:00
assert -> rassert for animatedvariable
This commit is contained in:
parent
c279b08b3d
commit
d798376330
1 changed files with 15 additions and 15 deletions
|
@ -23,56 +23,56 @@ public:
|
|||
|
||||
// gets the current vector value (real time)
|
||||
const Vector2D& vec() const {
|
||||
ASSERT(m_eVarType == AVARTYPE_VECTOR);
|
||||
RASSERT(m_eVarType == AVARTYPE_VECTOR, "Tried to access vec() of AVARTYPE %i!", m_eVarType);
|
||||
return m_vValue;
|
||||
}
|
||||
|
||||
// gets the current float value (real time)
|
||||
const float& fl() const {
|
||||
ASSERT(m_eVarType == AVARTYPE_FLOAT);
|
||||
RASSERT(m_eVarType == AVARTYPE_FLOAT, "Tried to access fl() of AVARTYPE %i!", m_eVarType);
|
||||
return m_fValue;
|
||||
}
|
||||
|
||||
// gets the current color value (real time)
|
||||
const CColor& col() const {
|
||||
ASSERT(m_eVarType == AVARTYPE_COLOR);
|
||||
RASSERT(m_eVarType == AVARTYPE_COLOR, "Tried to access col() of AVARTYPE %i!", m_eVarType);
|
||||
return m_cValue;
|
||||
}
|
||||
|
||||
// gets the goal vector value
|
||||
const Vector2D& goalv() const {
|
||||
ASSERT(m_eVarType == AVARTYPE_VECTOR);
|
||||
RASSERT(m_eVarType == AVARTYPE_VECTOR, "Tried to access goalv() of AVARTYPE %i!", m_eVarType);
|
||||
return m_vGoal;
|
||||
}
|
||||
|
||||
// gets the goal float value
|
||||
const float& goalf() const {
|
||||
ASSERT(m_eVarType == AVARTYPE_FLOAT);
|
||||
RASSERT(m_eVarType == AVARTYPE_FLOAT, "Tried to access goalf() of AVARTYPE %i!", m_eVarType);
|
||||
return m_fGoal;
|
||||
}
|
||||
|
||||
// gets the goal color value
|
||||
const CColor& goalc() const {
|
||||
ASSERT(m_eVarType == AVARTYPE_COLOR);
|
||||
RASSERT(m_eVarType == AVARTYPE_COLOR, "Tried to access goalc() of AVARTYPE %i!", m_eVarType);
|
||||
return m_cGoal;
|
||||
}
|
||||
|
||||
void operator=(const Vector2D& v) {
|
||||
ASSERT(m_eVarType == AVARTYPE_VECTOR);
|
||||
RASSERT(m_eVarType == AVARTYPE_VECTOR, "Tried to access =v of AVARTYPE %i!", m_eVarType);
|
||||
m_vGoal = v;
|
||||
animationBegin = std::chrono::system_clock::now();
|
||||
m_vBegun = m_vValue;
|
||||
}
|
||||
|
||||
void operator=(const float& v) {
|
||||
ASSERT(m_eVarType == AVARTYPE_FLOAT);
|
||||
RASSERT(m_eVarType == AVARTYPE_FLOAT, "Tried to access =f of AVARTYPE %i!", m_eVarType);
|
||||
m_fGoal = v;
|
||||
animationBegin = std::chrono::system_clock::now();
|
||||
m_fBegun = m_fValue;
|
||||
}
|
||||
|
||||
void operator=(const CColor& v) {
|
||||
ASSERT(m_eVarType == AVARTYPE_COLOR);
|
||||
RASSERT(m_eVarType == AVARTYPE_COLOR, "Tried to access =c of AVARTYPE %i!", m_eVarType);
|
||||
m_cGoal = v;
|
||||
animationBegin = std::chrono::system_clock::now();
|
||||
m_cBegun = m_cValue;
|
||||
|
@ -80,7 +80,7 @@ public:
|
|||
|
||||
// Sets the actual stored value, without affecting the goal, but resets the timer
|
||||
void setValue(const Vector2D& v) {
|
||||
ASSERT(m_eVarType == AVARTYPE_VECTOR);
|
||||
RASSERT(m_eVarType == AVARTYPE_VECTOR, "Tried to access setValue(v) of AVARTYPE %i!", m_eVarType);
|
||||
m_vValue = v;
|
||||
animationBegin = std::chrono::system_clock::now();
|
||||
m_vBegun = m_vValue;
|
||||
|
@ -88,7 +88,7 @@ public:
|
|||
|
||||
// Sets the actual stored value, without affecting the goal, but resets the timer
|
||||
void setValue(const float& v) {
|
||||
ASSERT(m_eVarType == AVARTYPE_FLOAT);
|
||||
RASSERT(m_eVarType == AVARTYPE_FLOAT, "Tried to access setValue(f) of AVARTYPE %i!", m_eVarType);
|
||||
m_fValue = v;
|
||||
animationBegin = std::chrono::system_clock::now();
|
||||
m_vBegun = m_vValue;
|
||||
|
@ -96,7 +96,7 @@ public:
|
|||
|
||||
// Sets the actual stored value, without affecting the goal, but resets the timer
|
||||
void setValue(const CColor& v) {
|
||||
ASSERT(m_eVarType == AVARTYPE_COLOR);
|
||||
RASSERT(m_eVarType == AVARTYPE_COLOR, "Tried to access setValue(c) of AVARTYPE %i!", m_eVarType);
|
||||
m_cValue = v;
|
||||
animationBegin = std::chrono::system_clock::now();
|
||||
m_vBegun = m_vValue;
|
||||
|
@ -104,21 +104,21 @@ public:
|
|||
|
||||
// Sets the actual value and goal
|
||||
void setValueAndWarp(const Vector2D& v) {
|
||||
ASSERT(m_eVarType == AVARTYPE_VECTOR);
|
||||
RASSERT(m_eVarType == AVARTYPE_VECTOR, "Tried to access setValueAndWarp(v) of AVARTYPE %i!", m_eVarType);
|
||||
m_vGoal = v;
|
||||
warp();
|
||||
}
|
||||
|
||||
// Sets the actual value and goal
|
||||
void setValueAndWarp(const float& v) {
|
||||
ASSERT(m_eVarType == AVARTYPE_FLOAT);
|
||||
RASSERT(m_eVarType == AVARTYPE_FLOAT, "Tried to access setValueAndWarp(f) of AVARTYPE %i!", m_eVarType);
|
||||
m_fGoal = v;
|
||||
warp();
|
||||
}
|
||||
|
||||
// Sets the actual value and goal
|
||||
void setValueAndWarp(const CColor& v) {
|
||||
ASSERT(m_eVarType == AVARTYPE_COLOR);
|
||||
RASSERT(m_eVarType == AVARTYPE_COLOR, "Tried to access setValueAndWarp(c) of AVARTYPE %i!", m_eVarType);
|
||||
m_cGoal = v;
|
||||
warp();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue