History

Adding some fixmes to the code, since globals are evil and such checks should be confined to debug mode only

Brad Davis committed 11 years ago

Commit 16622301 parent e6163081 file · +3 −1Browse files

Showing the changes to interface/src/Application.cpp (1 of 1 file). Show all

Unified · Split

interface/src/Application.cpp+3−1
@@ -2795,11 +2795,12 @@ QImage Application::renderAvatarBillboard() { · 2794 unmodified lines
2795 return image;2795 return image;
2796}2796}
2797 2797
2798 2798// FIXME, preprocessor guard this check to occur only in DEBUG builds
2799static QThread * activeRenderingThread = nullptr;2799static QThread * activeRenderingThread = nullptr;
2800 2800
2801ViewFrustum* Application::getViewFrustum() {2801ViewFrustum* Application::getViewFrustum() {
2802 if (QThread::currentThread() == activeRenderingThread) {2802 if (QThread::currentThread() == activeRenderingThread) {
2803 // FIXME, should this be an assert?
2803 qWarning() << "Calling Application::getViewFrustum() from the active rendering thread, did you mean Application::getDisplayViewFrustum()?";2804 qWarning() << "Calling Application::getViewFrustum() from the active rendering thread, did you mean Application::getDisplayViewFrustum()?";
2804 }2805 }
2805 return &_viewFrustum;2806 return &_viewFrustum;
@@ -2807,6 +2808,7 @@ ViewFrustum* Application::getViewFrustum() { · 1 unmodified line
2807 2808
2808ViewFrustum* Application::getDisplayViewFrustum() {2809ViewFrustum* Application::getDisplayViewFrustum() {
2809 if (QThread::currentThread() != activeRenderingThread) {2810 if (QThread::currentThread() != activeRenderingThread) {
2811 // FIXME, should this be an assert?
2810 qWarning() << "Calling Application::getDisplayViewFrustum() from outside the active rendering thread or outside rendering, did you mean Application::getViewFrustum()?";2812 qWarning() << "Calling Application::getDisplayViewFrustum() from outside the active rendering thread or outside rendering, did you mean Application::getViewFrustum()?";
2811 }2813 }
2812 return &_displayViewFrustum;2814 return &_displayViewFrustum;