-
-
Save 00mjk/0a3f263be0a4e10ebde71288b613cb25 to your computer and use it in GitHub Desktop.
Clang fixes for MAME
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/emu/device.h b/src/emu/device.h | |
index df101d9..a20d341 100644 | |
--- a/src/emu/device.h | |
+++ b/src/emu/device.h | |
@@ -377,9 +377,10 @@ protected: | |
virtual ~shared_ptr_finder() { if (m_allocated) global_free(m_target); } | |
// operators to make use transparent | |
- operator _PointerType *() { return m_target; } | |
operator _PointerType *() const { return m_target; } | |
_PointerType *operator->() { return m_target; } | |
+ _PointerType &operator[](int index) { return m_target[index]; } | |
+ _PointerType operator[](int index) const { return m_target[index]; } | |
// getter for explicit fetching | |
_PointerType *target() const { return m_target; } | |
diff --git a/src/emu/video/polynew.h b/src/emu/video/polynew.h | |
index 296d214..4b5fd55 100644 | |
--- a/src/emu/video/polynew.h | |
+++ b/src/emu/video/polynew.h | |
@@ -1112,10 +1112,10 @@ int poly_manager<_BaseType, _ObjectData, _MaxParams, _MaxPolys>::zclip_if_less(i | |
const vertex_t &v1 = v[(vertnum == 0) ? (numverts - 1) : (vertnum - 1)]; | |
const vertex_t &v2 = v[vertnum]; | |
_BaseType frac = (clipval - v1.p[0]) / (v2.p[0] - v1.p[0]); | |
- nextout.x = v1.x + frac * (v2.x - v1.x); | |
- nextout.y = v1.y + frac * (v2.y - v1.y); | |
+ nextout->x = v1.x + frac * (v2.x - v1.x); | |
+ nextout->y = v1.y + frac * (v2.y - v1.y); | |
for (int paramnum = 0; paramnum < paramcount; paramnum++) | |
- nextout.p[paramnum] = v1.p[paramnum] + frac * (v2.p[paramnum] - v1.p[paramnum]); | |
+ nextout->p[paramnum] = v1.p[paramnum] + frac * (v2.p[paramnum] - v1.p[paramnum]); | |
nextout++; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment