Skip to content

Commit 3cdadf9

Browse files
nseamkenorb
authored andcommitted
Should fix problem "'array' - constant variable cannot be passed [GH-661] (#660)
1 parent 78a0fbd commit 3cdadf9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Array.mqh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -691,7 +691,7 @@ static int GetLowestArrDoubleValue(double& arr[][], int key) {
691691
* - https://www.mql5.com/en/docs/array/arraymaximum
692692
*/
693693
template <typename X>
694-
static int ArrayMinimum(const ARRAY_REF(X, _array), int _start = 0, int _count = WHOLE_ARRAY) {
694+
static int ArrayMinimum(ARRAY_REF(X, _array), int _start = 0, int _count = WHOLE_ARRAY) {
695695
#ifdef __MQL__
696696
return ::ArrayMinimum(_array);
697697
#else
@@ -724,7 +724,7 @@ static int GetLowestArrDoubleValue(double& arr[][], int key) {
724724
* - https://www.mql5.com/en/docs/array/arraymaximum
725725
*/
726726
template <typename X>
727-
static int ArrayMaximum(const ARRAY_REF(X, _array), int start = 0, int count = WHOLE_ARRAY) {
727+
static int ArrayMaximum(ARRAY_REF(X, _array), int start = 0, int count = WHOLE_ARRAY) {
728728
#ifdef __MQL__
729729
return ::ArrayMaximum(_array);
730730
#else
@@ -753,7 +753,7 @@ static int GetLowestArrDoubleValue(double& arr[][], int key) {
753753
* - https://www.mql5.com/en/docs/array/arraysize
754754
*/
755755
template <typename X>
756-
static int ArraySize(const ARRAY_REF(X, array)) {
756+
static int ArraySize(ARRAY_REF(X, array)) {
757757
return ::ArraySize(array);
758758
}
759759

@@ -769,7 +769,7 @@ static int GetLowestArrDoubleValue(double& arr[][], int key) {
769769

770770
template <typename X>
771771
void ArrayPush(ARRAY_REF(X, array), X value) {
772-
ArrayResize(ArraySize(array) + 1);
772+
ArrayResize(Array::ArraySize(array) + 1);
773773
array[ArraySize(array) - 1] = value;
774774
}
775775
template <typename X>

0 commit comments

Comments
 (0)