diff --git a/modules/juce_audio_plugin_client/AAX/juce_AAX_Wrapper.cpp b/modules/juce_audio_plugin_client/AAX/juce_AAX_Wrapper.cpp index 115711e676..f56a0781b8 100644 --- a/modules/juce_audio_plugin_client/AAX/juce_AAX_Wrapper.cpp +++ b/modules/juce_audio_plugin_client/AAX/juce_AAX_Wrapper.cpp @@ -248,7 +248,7 @@ struct AAXClasses } } - virtual AAX_Result GetViewSize (AAX_Point* const viewSize) const + virtual AAX_Result GetViewSize (AAX_Point* viewSize) const { if (component != nullptr) { diff --git a/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.mm b/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.mm index 11c4f4d670..702e38c5b5 100644 --- a/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.mm +++ b/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.mm @@ -215,8 +215,7 @@ void setNativeHostWindowSize (void* nsWindow, Component* component, int newWidth JUCE_AUTORELEASEPOOL #if JUCE_64BIT - NSView* hostView = (NSView*) nsWindow; - if (hostView != nil) + if (NSView* hostView = (NSView*) nsWindow) { // xxx is this necessary, or do the hosts detect a change in the child view and do this automatically? [hostView setFrameSize: NSMakeSize ([hostView frame].size.width + (newWidth - component->getWidth()), @@ -224,9 +223,8 @@ void setNativeHostWindowSize (void* nsWindow, Component* component, int newWidth } #else - HIViewRef dummyView = (HIViewRef) (void*) (pointer_sized_int) - component->getProperties() ["dummyViewRef"].toString().getHexValue64(); - if (dummyView != 0) + if (HIViewRef dummyView = (HIViewRef) (void*) (pointer_sized_int) + component->getProperties() ["dummyViewRef"].toString().getHexValue64()) { HIRect frameRect; HIViewGetFrame (dummyView, &frameRect); diff --git a/modules/juce_gui_basics/keyboard/juce_KeyListener.h b/modules/juce_gui_basics/keyboard/juce_KeyListener.h index 6d3379f2f6..5974b285ba 100644 --- a/modules/juce_gui_basics/keyboard/juce_KeyListener.h +++ b/modules/juce_gui_basics/keyboard/juce_KeyListener.h @@ -37,7 +37,7 @@ class Component; You can add a key listener to a component to be informed when that component gets key events. See the Component::addListener method for more details. - @see KeyPress, Component::addKeyListener, KeyPressMappingManager + @see KeyPress, Component::addKeyListener, KeyPressMappingSet */ class JUCE_API KeyListener { diff --git a/modules/juce_gui_basics/keyboard/juce_KeyPress.h b/modules/juce_gui_basics/keyboard/juce_KeyPress.h index ddbf904e83..532fe9f00a 100644 --- a/modules/juce_gui_basics/keyboard/juce_KeyPress.h +++ b/modules/juce_gui_basics/keyboard/juce_KeyPress.h @@ -35,7 +35,7 @@ E.g. a KeyPress might represent CTRL+C, SHIFT+ALT+H, Spacebar, Escape, etc. - @see Component, KeyListener, Button::addShortcut, KeyPressMappingManager + @see Component, KeyListener, KeyPressMappingSet, Button::addShortcut */ class JUCE_API KeyPress { diff --git a/modules/juce_gui_basics/keyboard/juce_ModifierKeys.h b/modules/juce_gui_basics/keyboard/juce_ModifierKeys.h index 5afaaec0e3..23cc8831ae 100644 --- a/modules/juce_gui_basics/keyboard/juce_ModifierKeys.h +++ b/modules/juce_gui_basics/keyboard/juce_ModifierKeys.h @@ -106,7 +106,7 @@ public: */ inline bool isCtrlDown() const noexcept { return testFlags (ctrlModifier); } - /** Checks whether the shift key's flag is set. */ + /** Checks whether the ALT key's flag is set. */ inline bool isAltDown() const noexcept { return testFlags (altModifier); } //============================================================================== diff --git a/modules/juce_gui_basics/native/juce_mac_NSViewComponentPeer.mm b/modules/juce_gui_basics/native/juce_mac_NSViewComponentPeer.mm index e7b72de08a..e2476340ee 100644 --- a/modules/juce_gui_basics/native/juce_mac_NSViewComponentPeer.mm +++ b/modules/juce_gui_basics/native/juce_mac_NSViewComponentPeer.mm @@ -1532,9 +1532,11 @@ private: static NSRange markedRange (id self, SEL) { - NSViewComponentPeer* const owner = getOwner (self); - return owner->stringBeingComposed.isNotEmpty() ? NSMakeRange (0, (NSUInteger) owner->stringBeingComposed.length()) - : NSMakeRange (NSNotFound, 0); + if (NSViewComponentPeer* const owner = getOwner (self)) + if (owner->stringBeingComposed.isNotEmpty()) + return NSMakeRange (0, (NSUInteger) owner->stringBeingComposed.length()); + + return NSMakeRange (NSNotFound, 0); } static NSRange selectedRange (id self, SEL) @@ -1585,10 +1587,9 @@ private: #if MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5 static BOOL performKeyEquivalent (id self, SEL, NSEvent* ev) { - NSViewComponentPeer* const owner = getOwner (self); - - if (owner != nullptr && owner->redirectPerformKeyEquivalent (ev)) - return true; + if (NSViewComponentPeer* const owner = getOwner (self)) + if (owner->redirectPerformKeyEquivalent (ev)) + return true; objc_super s = { self, [NSView class] }; return objc_msgSendSuper (&s, @selector (performKeyEquivalent:), ev) != nil; @@ -1751,10 +1752,9 @@ private: static void windowWillMove (id self, SEL, NSNotification*) { - NSViewComponentPeer* const owner = getOwner (self); - - if (owner != nullptr && owner->hasNativeTitleBar()) - owner->sendModalInputAttemptIfBlocked(); + if (NSViewComponentPeer* const owner = getOwner (self)) + if (owner->hasNativeTitleBar()) + owner->sendModalInputAttemptIfBlocked(); } };