Skip to content

Commit

Permalink
Prefer && rather than and operator
Browse files Browse the repository at this point in the history
  • Loading branch information
Naros committed Aug 24, 2024
1 parent 3307fd1 commit 7bbc5a1
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/script/nodes/data/arrays.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ void OScriptNodeMakeArray::add_dynamic_pin()

bool OScriptNodeMakeArray::can_remove_dynamic_pin(const Ref<OScriptNodePin>& p_pin) const
{
return _element_count > 0 and p_pin->is_input();
return _element_count > 0 && p_pin->is_input();
}

void OScriptNodeMakeArray::remove_dynamic_pin(const Ref<OScriptNodePin>& p_pin)
Expand Down
2 changes: 1 addition & 1 deletion src/script/nodes/utilities/autoload.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ bool OScriptNodeAutoload::_set(const StringName& p_name, const Variant& p_value)

void OScriptNodeAutoload::_upgrade(uint32_t p_version, uint32_t p_current_version)
{
if (p_version == 1 and p_current_version >= 2)
if (p_version == 1 && p_current_version >= 2)
{
// Fixup - makes sure that autoload class type is encoded in pin
Ref<OScriptNodePin> pin = find_pin("autoload", PD_Output);
Expand Down
2 changes: 1 addition & 1 deletion src/script/nodes/utilities/engine_singleton.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ bool OScriptNodeEngineSingleton::_set(const StringName& p_name, const Variant& p

void OScriptNodeEngineSingleton::_upgrade(uint32_t p_version, uint32_t p_current_version)
{
if (p_version == 1 and p_current_version >= 2)
if (p_version == 1 && p_current_version >= 2)
{
// Fixup - makes sure that singleton class type is encoded in pin
const Ref<OScriptNodePin> singleton = find_pin("singleton", PD_Output);
Expand Down
2 changes: 1 addition & 1 deletion src/script/nodes/utilities/self.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class OScriptNodeSelfInstance : public OScriptNodeInstance

void OScriptNodeSelf::_upgrade(uint32_t p_version, uint32_t p_current_version)
{
if (p_version == 1 and p_current_version >= 2)
if (p_version == 1 && p_current_version >= 2)
{
// Fixup - makes sure that base type matches pin
const Ref<OScriptNodePin> self = find_pin("self", PD_Output);
Expand Down
2 changes: 1 addition & 1 deletion src/script/nodes/variables/local_variable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ void OScriptNodeLocalVariable::initialize(const OScriptNodeInitContext& p_contex

void OScriptNodeAssignLocalVariable::_upgrade(uint32_t p_version, uint32_t p_current_version)
{
if (p_version == 1 and p_current_version >= 2)
if (p_version == 1 && p_current_version >= 2)
{
// Fixup - make sure variant is encoded for nils
Ref<OScriptNodePin> variable = find_pin("variable", PD_Input);
Expand Down
2 changes: 1 addition & 1 deletion src/script/nodes/variables/variable_get.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ bool OScriptNodeVariableGet::_set(const StringName& p_name, const Variant& p_val

void OScriptNodeVariableGet::_upgrade(uint32_t p_version, uint32_t p_current_version)
{
if (p_version == 1 and p_current_version >= 2)
if (p_version == 1 && p_current_version >= 2)
{
// Fixup - makes sure that stored property matches variable, if not reconstructs
if (_variable.is_valid())
Expand Down
2 changes: 1 addition & 1 deletion src/script/nodes/variables/variable_set.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class OScriptNodeVariableSetInstance : public OScriptNodeInstance

void OScriptNodeVariableSet::_upgrade(uint32_t p_version, uint32_t p_current_version)
{
if (p_version == 1 and p_current_version >= 2)
if (p_version == 1 && p_current_version >= 2)
{
// Fixup - makes sure that stored property matches variable, if not reconstructs
if (_variable.is_valid())
Expand Down

0 comments on commit 7bbc5a1

Please sign in to comment.