Browse Source

MSVC: Added a workaround for a compiler bug

tags/2021-05-28
hogliux 7 years ago
parent
commit
5799a4ee5b
1 changed files with 5 additions and 4 deletions
  1. +5
    -4
      modules/juce_core/containers/juce_Array.h

+ 5
- 4
modules/juce_core/containers/juce_Array.h View File

@@ -274,7 +274,8 @@ public:
return data.elements[index];
}
return {};
// We can't default aggregate initialise here "{}" due to a VS2017 compiler bug
return ElementType();
}
/** Returns one of the elements in the array, without checking the index passed in.
@@ -322,7 +323,7 @@ public:
return data.elements[0];
}
return {};
return ElementType();
}
/** Returns the last element in the array, or a default value if the array is empty.
@@ -339,7 +340,7 @@ public:
return data.elements[numUsed - 1];
}
return {};
return ElementType();
}
/** Returns a pointer to the actual array data.
@@ -890,7 +891,7 @@ public:
return removed;
}
return {};
return ElementType();
}
/** Removes an element from the array.


Loading…
Cancel
Save