From 44b4ccc693ff2e56e4a1616f10106c0c5ff6275d Mon Sep 17 00:00:00 2001 From: jules Date: Fri, 2 Aug 2013 14:15:14 +0100 Subject: [PATCH] Removed the constness from the return type of LookAndFeel::getTypefaceForFont(), to allow the move operator to be used. --- .../lookandfeel/juce_LookAndFeel.cpp | 2 +- .../juce_gui_basics/lookandfeel/juce_LookAndFeel.h | 2 +- .../juce_gui_basics/native/juce_win32_Windowing.cpp | 13 ++++++------- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel.cpp b/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel.cpp index 194601c80c..0f4513ff07 100644 --- a/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel.cpp +++ b/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel.cpp @@ -264,7 +264,7 @@ void LookAndFeel::setDefaultLookAndFeel (LookAndFeel* newDefaultLookAndFeel) noe } //============================================================================== -const Typeface::Ptr LookAndFeel::getTypefaceForFont (const Font& font) +Typeface::Ptr LookAndFeel::getTypefaceForFont (const Font& font) { if (defaultSans.isNotEmpty() && font.getTypefaceName() == Font::getDefaultSansSerifFontName()) { diff --git a/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel.h b/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel.h index c43a1d015d..c02a32dcf4 100644 --- a/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel.h +++ b/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel.h @@ -128,7 +128,7 @@ public: //============================================================================== - virtual const Typeface::Ptr getTypefaceForFont (const Font& font); + virtual Typeface::Ptr getTypefaceForFont (const Font& font); /** Allows you to change the default sans-serif font. diff --git a/modules/juce_gui_basics/native/juce_win32_Windowing.cpp b/modules/juce_gui_basics/native/juce_win32_Windowing.cpp index 47963d00ec..f8def2565b 100644 --- a/modules/juce_gui_basics/native/juce_win32_Windowing.cpp +++ b/modules/juce_gui_basics/native/juce_win32_Windowing.cpp @@ -1404,15 +1404,14 @@ private: static BOOL CALLBACK clipChildWindowCallback (HWND hwnd, LPARAM context) { - RECT childPos; - GetWindowRect (hwnd, &childPos); - POINT pos = { childPos.left, childPos.top }; + RECT r; + GetWindowRect (hwnd, &r); + POINT pos = { r.left, r.top }; ScreenToClient (GetParent (hwnd), &pos); - ((RectangleList*) context)->subtract (Rectangle (pos.x, - pos.y, - childPos.right - childPos.left, - childPos.bottom - childPos.top)); + ((RectangleList*) context)->subtract (Rectangle (pos.x, pos.y, + r.right - r.left, + r.bottom - r.top)); return TRUE; }