Skip to content

Commit

Permalink
Should fix problem "'array' - constant variable cannot be passed as r…
Browse files Browse the repository at this point in the history
…eference" in Array.mqh.
  • Loading branch information
nseam authored and kenorb committed May 22, 2023
1 parent d8d5a5b commit c0dbe42
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Array.mqh
Original file line number Diff line number Diff line change
Expand Up @@ -748,7 +748,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 @@ -764,7 +764,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 c0dbe42

Please sign in to comment.