From ab2c9256547e52ecb2ef62f883ccde347fdf8b56 Mon Sep 17 00:00:00 2001 From: Andrzej Rybczak Date: Mon, 16 Feb 2009 20:13:34 +0100 Subject: [PATCH] Revert "cast properly", that wasn't proper casting, lol. This reverts commit 0415fa37fe8694a9ab647a9d00895fefbb50b01f. --- src/ncmpcpp.cpp | 2 +- src/screen.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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()