From fdaa2920eb21fff3320a17e9239e04dfadecdb00 Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Sat, 18 Apr 2015 14:38:54 -0300 Subject: Updated copyright year in all headers --- core/variant_op.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core/variant_op.cpp') diff --git a/core/variant_op.cpp b/core/variant_op.cpp index ba8000b92d..361e31f743 100644 --- a/core/variant_op.cpp +++ b/core/variant_op.cpp @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ -- cgit v1.2.3 From 3203a03414873e88bab879245922d57ad965473c Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Sun, 26 Apr 2015 12:12:53 -0300 Subject: Fixed bug in array comparison, fixes #1712 --- core/variant_op.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'core/variant_op.cpp') diff --git a/core/variant_op.cpp b/core/variant_op.cpp index 361e31f743..01aa496295 100644 --- a/core/variant_op.cpp +++ b/core/variant_op.cpp @@ -290,8 +290,9 @@ void Variant::evaluate(const Operator& p_op, const Variant& p_a, const Variant& if (arr_b->size()!=l) _RETURN( false ); for(int i=0;i Date: Fri, 1 May 2015 02:53:41 +0200 Subject: Sort xml files, so order is constant Makes xml format work better with version control systems. --- core/variant_op.cpp | 51 ++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 38 insertions(+), 13 deletions(-) (limited to 'core/variant_op.cpp') diff --git a/core/variant_op.cpp b/core/variant_op.cpp index 01aa496295..dafe3bd02d 100644 --- a/core/variant_op.cpp +++ b/core/variant_op.cpp @@ -165,6 +165,12 @@ r_valid=false;\ return;} #define DEFAULT_OP_ARRAY_EQ(m_name,m_type)\ +DEFAULT_OP_ARRAY_OP(m_name,m_type,!=,!=,true,false,false) + +#define DEFAULT_OP_ARRAY_LT(m_name,m_type)\ +DEFAULT_OP_ARRAY_OP(m_name,m_type,<,!=,false,a_len &array_b=*reinterpret_cast *>(p_b._data._mem);\ \ int a_len = array_a.size();\ - if (a_len!=array_b.size()){\ - _RETURN( false);\ + if (a_len m_opa array_b.size()){\ + _RETURN( m_ret_s);\ }else {\ \ DVector::Read ra = array_a.read();\ DVector::Read rb = array_b.read();\ \ for(int i=0;i(p_a._data._mem); + const Array *arr_b=reinterpret_cast(p_b._data._mem); + + int l = arr_a->size(); + if (arr_b->size() Date: Fri, 1 May 2015 10:44:08 -0300 Subject: -Fixes from source code analyzizer, closes #1768 --- core/variant_op.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core/variant_op.cpp') diff --git a/core/variant_op.cpp b/core/variant_op.cpp index dafe3bd02d..f68652b8cc 100644 --- a/core/variant_op.cpp +++ b/core/variant_op.cpp @@ -2433,7 +2433,7 @@ Variant Variant::get(const Variant& p_index, bool *r_valid) const { } else if (str == "pressed") { valid=true; - ie.action.pressed; + return ie.action.pressed; } } -- cgit v1.2.3