summaryrefslogtreecommitdiff
path: root/indra/llwindow
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2022-05-10 12:26:44 -0400
committerNat Goodspeed <nat@lindenlab.com>2022-05-10 12:26:44 -0400
commit4dddb17dfc0dc2c0bdd21263574707a91f2b00a9 (patch)
treec98fdff4755eb2fdd1a7fa33367d82a423aac5e7 /indra/llwindow
parent3604edc27eedff24dc1f17624a77c130b498e9f1 (diff)
SL-17219: Mark LLWindowHeadless virtual overrides 'override'.
Also LLSplashScreenHeadless methods. Without this Mac builds fail.
Diffstat (limited to 'indra/llwindow')
-rw-r--r--indra/llwindow/llwindowheadless.h133
1 files changed, 69 insertions, 64 deletions
diff --git a/indra/llwindow/llwindowheadless.h b/indra/llwindow/llwindowheadless.h
index 0e1f603db7..2f2c0de5bd 100644
--- a/indra/llwindow/llwindowheadless.h
+++ b/indra/llwindow/llwindowheadless.h
@@ -32,74 +32,79 @@
class LLWindowHeadless : public LLWindow
{
public:
- /*virtual*/ void show() {};
- /*virtual*/ void hide() {};
- /*virtual*/ void close() {};
- /*virtual*/ BOOL getVisible() {return FALSE;};
- /*virtual*/ BOOL getMinimized() {return FALSE;};
- /*virtual*/ BOOL getMaximized() {return FALSE;};
- /*virtual*/ BOOL maximize() {return FALSE;};
- /*virtual*/ void minimize() {};
- /*virtual*/ void restore() {};
- /*virtual*/ BOOL getFullscreen() {return FALSE;};
- /*virtual*/ BOOL getPosition(LLCoordScreen *position) {return FALSE;};
- /*virtual*/ BOOL getSize(LLCoordScreen *size) {return FALSE;};
- /*virtual*/ BOOL getSize(LLCoordWindow *size) {return FALSE;};
- /*virtual*/ BOOL setPosition(LLCoordScreen position) {return FALSE;};
- /*virtual*/ BOOL setSizeImpl(LLCoordScreen size) {return FALSE;};
- /*virtual*/ BOOL setSizeImpl(LLCoordWindow size) {return FALSE;};
- /*virtual*/ BOOL switchContext(BOOL fullscreen, const LLCoordScreen &size, BOOL enable_vsync, const LLCoordScreen * const posp = NULL) {return FALSE;};
- void* createSharedContext() { return nullptr; }
- void makeContextCurrent(void*) {}
- void destroySharedContext(void*) {}
- /*virtual*/ void toggleVSync(bool enable_vsync) { }
- /*virtual*/ BOOL setCursorPosition(LLCoordWindow position) {return FALSE;};
- /*virtual*/ BOOL getCursorPosition(LLCoordWindow *position) {return FALSE;};
+ /*virtual*/ void show() override {}
+ /*virtual*/ void hide() override {}
+ /*virtual*/ void close() override {}
+ /*virtual*/ BOOL getVisible() override {return FALSE;}
+ /*virtual*/ BOOL getMinimized() override {return FALSE;}
+ /*virtual*/ BOOL getMaximized() override {return FALSE;}
+ /*virtual*/ BOOL maximize() override {return FALSE;}
+ /*virtual*/ void minimize() override {}
+ /*virtual*/ void restore() override {}
+ // TODO: LLWindow::getFullscreen() is (intentionally?) NOT virtual.
+ // Apparently the coder of LLWindowHeadless didn't realize that. Is it a
+ // mistake to shadow the base-class method with an LLWindowHeadless
+ // override when called on the subclass, yet call the base-class method
+ // when indirecting through a polymorphic pointer or reference?
+ BOOL getFullscreen() {return FALSE;}
+ /*virtual*/ BOOL getPosition(LLCoordScreen *position) override {return FALSE;}
+ /*virtual*/ BOOL getSize(LLCoordScreen *size) override {return FALSE;}
+ /*virtual*/ BOOL getSize(LLCoordWindow *size) override {return FALSE;}
+ /*virtual*/ BOOL setPosition(LLCoordScreen position) override {return FALSE;}
+ /*virtual*/ BOOL setSizeImpl(LLCoordScreen size) override {return FALSE;}
+ /*virtual*/ BOOL setSizeImpl(LLCoordWindow size) override {return FALSE;}
+ /*virtual*/ BOOL switchContext(BOOL fullscreen, const LLCoordScreen &size, BOOL enable_vsync, const LLCoordScreen * const posp = NULL) override {return FALSE;}
+ void* createSharedContext() override { return nullptr; }
+ void makeContextCurrent(void*) override {}
+ void destroySharedContext(void*) override {}
+ /*virtual*/ void toggleVSync(bool enable_vsync) override { }
+ /*virtual*/ BOOL setCursorPosition(LLCoordWindow position) override {return FALSE;}
+ /*virtual*/ BOOL getCursorPosition(LLCoordWindow *position) override {return FALSE;}
#if LL_WINDOWS
- /*virtual*/ BOOL getCursorDelta(LLCoordCommon* delta) { return FALSE; }
+ /*virtual*/ BOOL getCursorDelta(LLCoordCommon* delta) override { return FALSE; }
#endif
- /*virtual*/ void showCursor() {};
- /*virtual*/ void hideCursor() {};
- /*virtual*/ void showCursorFromMouseMove() {};
- /*virtual*/ void hideCursorUntilMouseMove() {};
- /*virtual*/ BOOL isCursorHidden() {return FALSE;};
- /*virtual*/ void updateCursor() {};
- //virtual ECursorType getCursor() { return mCurrentCursor; };
- /*virtual*/ void captureMouse() {};
- /*virtual*/ void releaseMouse() {};
- /*virtual*/ void setMouseClipping( BOOL b ) {};
- /*virtual*/ BOOL isClipboardTextAvailable() {return FALSE; };
- /*virtual*/ BOOL pasteTextFromClipboard(LLWString &dst) {return FALSE; };
- /*virtual*/ BOOL copyTextToClipboard(const LLWString &src) {return FALSE; };
- /*virtual*/ void flashIcon(F32 seconds) {};
- /*virtual*/ F32 getGamma() {return 1.0f; };
- /*virtual*/ BOOL setGamma(const F32 gamma) {return FALSE; }; // Set the gamma
- /*virtual*/ void setFSAASamples(const U32 fsaa_samples) { }
- /*virtual*/ U32 getFSAASamples() { return 0; }
- /*virtual*/ BOOL restoreGamma() {return FALSE; }; // Restore original gamma table (before updating gamma)
- //virtual ESwapMethod getSwapMethod() { return mSwapMethod; }
- /*virtual*/ void gatherInput() {};
- /*virtual*/ void delayInputProcessing() {};
- /*virtual*/ void swapBuffers();
+ /*virtual*/ void showCursor() override {}
+ /*virtual*/ void hideCursor() override {}
+ /*virtual*/ void showCursorFromMouseMove() override {}
+ /*virtual*/ void hideCursorUntilMouseMove() override {}
+ /*virtual*/ BOOL isCursorHidden() override {return FALSE;}
+ /*virtual*/ void updateCursor() override {}
+ //virtual ECursorType getCursor() override { return mCurrentCursor; }
+ /*virtual*/ void captureMouse() override {}
+ /*virtual*/ void releaseMouse() override {}
+ /*virtual*/ void setMouseClipping( BOOL b ) override {}
+ /*virtual*/ BOOL isClipboardTextAvailable() override {return FALSE; }
+ /*virtual*/ BOOL pasteTextFromClipboard(LLWString &dst) override {return FALSE; }
+ /*virtual*/ BOOL copyTextToClipboard(const LLWString &src) override {return FALSE; }
+ /*virtual*/ void flashIcon(F32 seconds) override {}
+ /*virtual*/ F32 getGamma() override {return 1.0f; }
+ /*virtual*/ BOOL setGamma(const F32 gamma) override {return FALSE; } // Set the gamma
+ /*virtual*/ void setFSAASamples(const U32 fsaa_samples) override { }
+ /*virtual*/ U32 getFSAASamples() override { return 0; }
+ /*virtual*/ BOOL restoreGamma() override {return FALSE; } // Restore original gamma table (before updating gamma)
+ //virtual ESwapMethod getSwapMethod() override { return mSwapMethod; }
+ /*virtual*/ void gatherInput() override {}
+ /*virtual*/ void delayInputProcessing() override {}
+ /*virtual*/ void swapBuffers() override;
// handy coordinate space conversion routines
- /*virtual*/ BOOL convertCoords(LLCoordScreen from, LLCoordWindow *to) { return FALSE; };
- /*virtual*/ BOOL convertCoords(LLCoordWindow from, LLCoordScreen *to) { return FALSE; };
- /*virtual*/ BOOL convertCoords(LLCoordWindow from, LLCoordGL *to) { return FALSE; };
- /*virtual*/ BOOL convertCoords(LLCoordGL from, LLCoordWindow *to) { return FALSE; };
- /*virtual*/ BOOL convertCoords(LLCoordScreen from, LLCoordGL *to) { return FALSE; };
- /*virtual*/ BOOL convertCoords(LLCoordGL from, LLCoordScreen *to) { return FALSE; };
+ /*virtual*/ BOOL convertCoords(LLCoordScreen from, LLCoordWindow *to) override { return FALSE; }
+ /*virtual*/ BOOL convertCoords(LLCoordWindow from, LLCoordScreen *to) override { return FALSE; }
+ /*virtual*/ BOOL convertCoords(LLCoordWindow from, LLCoordGL *to) override { return FALSE; }
+ /*virtual*/ BOOL convertCoords(LLCoordGL from, LLCoordWindow *to) override { return FALSE; }
+ /*virtual*/ BOOL convertCoords(LLCoordScreen from, LLCoordGL *to) override { return FALSE; }
+ /*virtual*/ BOOL convertCoords(LLCoordGL from, LLCoordScreen *to) override { return FALSE; }
- /*virtual*/ LLWindowResolution* getSupportedResolutions(S32 &num_resolutions) { return NULL; };
- /*virtual*/ F32 getNativeAspectRatio() { return 1.0f; };
- /*virtual*/ F32 getPixelAspectRatio() { return 1.0f; };
- /*virtual*/ void setNativeAspectRatio(F32 ratio) {}
+ /*virtual*/ LLWindowResolution* getSupportedResolutions(S32 &num_resolutions) override { return NULL; }
+ /*virtual*/ F32 getNativeAspectRatio() override { return 1.0f; }
+ /*virtual*/ F32 getPixelAspectRatio() override { return 1.0f; }
+ /*virtual*/ void setNativeAspectRatio(F32 ratio) override {}
U32 getAvailableVRAMMegabytes() override { return 4096; }
- /*virtual*/ void *getPlatformWindow() { return 0; };
- /*virtual*/ void bringToFront() {};
+ /*virtual*/ void *getPlatformWindow() override { return 0; }
+ /*virtual*/ void bringToFront() override {}
LLWindowHeadless(LLWindowCallbacks* callbacks,
const std::string& title, const std::string& name,
@@ -115,12 +120,12 @@ private:
class LLSplashScreenHeadless : public LLSplashScreen
{
public:
- LLSplashScreenHeadless() {};
- virtual ~LLSplashScreenHeadless() {};
+ LLSplashScreenHeadless() {}
+ virtual ~LLSplashScreenHeadless() {}
- /*virtual*/ void showImpl() {};
- /*virtual*/ void updateImpl(const std::string& mesg) {};
- /*virtual*/ void hideImpl() {};
+ /*virtual*/ void showImpl() override {}
+ /*virtual*/ void updateImpl(const std::string& mesg) override {}
+ /*virtual*/ void hideImpl() override {}
};