Update array to use pointers

This commit is contained in:
Ryan Huffman 2014-11-25 08:34:44 -08:00
parent 8b982872c2
commit 925c2a8f6c

View file

@ -342,12 +342,12 @@ void OverlayPropertyResultFromScriptValue(const QScriptValue& value, OverlayProp
}
RayToOverlayIntersectionResult Overlays::findRayIntersection(const PickRay& ray) {
QMap<unsigned int, Overlay*> overlayMaps[] = { _overlays3DFront, _overlays3D };
QMap<unsigned int, Overlay*>* overlayMaps[] = { &_overlays3DFront, &_overlays3D };
float bestDistance = std::numeric_limits<float>::max();
RayToOverlayIntersectionResult result;
for (int idx = 0; idx < 2; idx++) {
QMapIterator<unsigned int, Overlay*> i(overlayMaps[idx]);
QMapIterator<unsigned int, Overlay*> i(*overlayMaps[idx]);
i.toBack();
while (i.hasPrevious()) {
i.previous();