diff --git a/src/ncmpcpp.cpp b/src/ncmpcpp.cpp index 48c240ac..2430c784 100644 --- a/src/ncmpcpp.cpp +++ b/src/ncmpcpp.cpp @@ -187,7 +187,7 @@ int main(int argc, char *argv[]) gettimeofday(&now, 0); // this type of casting is absolutely hillarious lol - Screen *&myWindow = reinterpret_cast *&>(myScreen); + Screen *&myWindow = *(Screen **)(void *)&myScreen; while (!main_exit) { diff --git a/src/screen.h b/src/screen.h index a8b31fb1..9c6956ca 100644 --- a/src/screen.h +++ b/src/screen.h @@ -77,7 +77,7 @@ template class Screen : public BasicScreen template void *&Screen::Cmp() { - return reinterpret_cast(w); + return *(void **)(void *)&w; } template WindowType *&Screen::Main()