Skip to content

Commit

Permalink
Should fix problem "'array' - constant variable cannot be passed [GH-661
Browse files Browse the repository at this point in the history
] (#660)
  • Loading branch information
nseam authored Dec 6, 2022
1 parent 8b0a1a6 commit 0bc026a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Array.mqh
Original file line number Diff line number Diff line change
Expand Up @@ -691,7 +691,7 @@ static int GetLowestArrDoubleValue(double& arr[][], int key) {
* - https://www.mql5.com/en/docs/array/arraymaximum
*/
template <typename X>
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
Expand Down Expand Up @@ -724,7 +724,7 @@ static int GetLowestArrDoubleValue(double& arr[][], int key) {
* - https://www.mql5.com/en/docs/array/arraymaximum
*/
template <typename X>
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
Expand Down Expand Up @@ -753,7 +753,7 @@ static int GetLowestArrDoubleValue(double& arr[][], int key) {
* - https://www.mql5.com/en/docs/array/arraysize
*/
template <typename X>
static int ArraySize(const ARRAY_REF(X, array)) {
static int ArraySize(ARRAY_REF(X, array)) {
return ::ArraySize(array);
}

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

template <typename X>
void ArrayPush(ARRAY_REF(X, array), X value) {
ArrayResize(ArraySize(array) + 1);
ArrayResize(Array::ArraySize(array) + 1);
array[ArraySize(array) - 1] = value;
}
template <typename X>
Expand Down

0 comments on commit 0bc026a

Please sign in to comment.