From bd53e7df72246ed1ff0734944705e5f4ddee8754 Mon Sep 17 00:00:00 2001 From: Adrian Kierzkowski Date: Wed, 7 Dec 2022 00:53:30 +0100 Subject: [PATCH] Should fix problem "'array' - constant variable cannot be passed [GH-661] (#660) --- Array.mqh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Array.mqh b/Array.mqh index 0a8a08635..419837dee 100644 --- a/Array.mqh +++ b/Array.mqh @@ -686,7 +686,7 @@ static int GetLowestArrDoubleValue(double& arr[][], int key) { * - https://www.mql5.com/en/docs/array/arraymaximum */ template - static int ArrayMinimum(const ARRAY_REF(X, _array), int _start = 0, int _count = WHOLE_ARRAY) { + static int ArrayMinimum(ARRAY_REF(X, _array), int _start = 0, int _count = WHOLE_ARRAY) { #ifdef __MQL__ return ::ArrayMinimum(_array); #else @@ -719,7 +719,7 @@ static int GetLowestArrDoubleValue(double& arr[][], int key) { * - https://www.mql5.com/en/docs/array/arraymaximum */ template - static int ArrayMaximum(const ARRAY_REF(X, _array), int start = 0, int count = WHOLE_ARRAY) { + static int ArrayMaximum(ARRAY_REF(X, _array), int start = 0, int count = WHOLE_ARRAY) { #ifdef __MQL__ return ::ArrayMaximum(_array); #else @@ -748,7 +748,7 @@ static int GetLowestArrDoubleValue(double& arr[][], int key) { * - https://www.mql5.com/en/docs/array/arraysize */ template - static int ArraySize(const ARRAY_REF(X, array)) { + static int ArraySize(ARRAY_REF(X, array)) { return ::ArraySize(array); } @@ -764,7 +764,7 @@ static int GetLowestArrDoubleValue(double& arr[][], int key) { template void ArrayPush(ARRAY_REF(X, array), X value) { - ArrayResize(ArraySize(array) + 1); + ArrayResize(Array::ArraySize(array) + 1); array[ArraySize(array) - 1] = value; } template