From 5353bfc963184911e03b4bb763eaf9c2192a2349 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 20 May 2017 17:01:25 +0200 Subject: [PATCH] Minor whitespace/style fixes Remove extra spaces, harmonize the style of "#endif" comments. --- include/wx/iconbndl.h | 4 ++-- include/wx/private/icondir.h | 15 ++++++--------- interface/wx/iconbndl.h | 29 ++++++++++++++++------------- src/common/iconbndl.cpp | 14 +++++++------- 4 files changed, 31 insertions(+), 31 deletions(-) diff --git a/include/wx/iconbndl.h b/include/wx/iconbndl.h index 6fe7eaf9b9..1fa02a84ff 100644 --- a/include/wx/iconbndl.h +++ b/include/wx/iconbndl.h @@ -58,7 +58,7 @@ public: // initializes the bundle with a single icon wxIconBundle(const wxIcon& icon); -#if defined( __WINDOWS__) && wxUSE_ICO_CUR +#if defined(__WINDOWS__) && wxUSE_ICO_CUR // initializes the bundle with the icons from a group icon stored as an MS Windows resource wxIconBundle(const wxString& resourceName, WXHINSTANCE module); #endif @@ -75,7 +75,7 @@ public: void AddIcon(wxInputStream& stream, wxBitmapType type = wxBITMAP_TYPE_ANY); #endif // wxUSE_STREAMS && wxUSE_IMAGE -#if defined( __WINDOWS__) && wxUSE_ICO_CUR +#if defined(__WINDOWS__) && wxUSE_ICO_CUR // loads all the icons from a group icon stored in an MS Windows resource void AddIcon(const wxString& resourceName, WXHINSTANCE module); #endif diff --git a/include/wx/private/icondir.h b/include/wx/private/icondir.h index 00856429f6..30cba3ae10 100644 --- a/include/wx/private/icondir.h +++ b/include/wx/private/icondir.h @@ -13,15 +13,13 @@ #include "wx/defs.h" // wxUint* declarations -// Structs declared here are used for loading group icons from +// Structs declared here are used for loading group icons from // .ICO files or MS Windows resources. // Icon entry and directory structs for .ICO files and // MS Windows resources are very similar but not identical. - #if wxUSE_ICO_CUR - #if wxUSE_STREAMS // icon entry in .ICO files @@ -49,7 +47,7 @@ struct ICONDIR wxUint16 idCount; // how many images? }; -#endif // #if wxUSE_STREAMS +#endif // wxUSE_STREAMS #ifdef __WINDOWS__ @@ -71,7 +69,7 @@ struct GRPICONDIRENTRY wxUint16 wBitCount; // Bits per pixel or YHotSpot wxUint32 dwBytesInRes; // how many bytes in this resource? - + wxUint16 nID; // actual icon resource ID }; @@ -86,9 +84,8 @@ struct GRPICONDIR #pragma pack(pop) -#endif // #ifdef __WINDOWS__ +#endif // __WINDOWS__ +#endif // wxUSE_ICO_CUR -#endif // #if wxUSE_ICO_CUR - -#endif // #ifndef _WX_PRIVATE_ICONDIR_H_ \ No newline at end of file +#endif // _WX_PRIVATE_ICONDIR_H_ diff --git a/interface/wx/iconbndl.h b/interface/wx/iconbndl.h index 3433663158..ef1fdd9023 100644 --- a/interface/wx/iconbndl.h +++ b/interface/wx/iconbndl.h @@ -69,14 +69,15 @@ public: wxIconBundle(const wxIcon& icon); /** - Initializes the bundle with all sizes of a group icon with @a resourceName - stored as an MS Windows resource in @a module. When @a module is 0, the current - instance is used. - - @see AddIcon(const wxString&, WXHINSTANCE) - - @onlyfor{wxmsw} - @since 3.1.1 + Initializes the bundle with all sizes of a group icon with @a + resourceName stored as an MS Windows resource in @a module. + + When @a module is 0, the current instance is used. + + @see AddIcon(const wxString&, WXHINSTANCE) + + @onlyfor{wxmsw} + @since 3.1.1 */ wxIconBundle(const wxString& resourceName, WXHINSTANCE module); @@ -111,11 +112,13 @@ public: void AddIcon(wxInputStream& stream, wxBitmapType type = wxBITMAP_TYPE_ANY); /** - Loads all sizes of a group icon with @a resourceName stored as an MS Windows - resource in @a module. When @a module is 0, the current instance is used. - - @onlyfor{wxmsw} - @since 3.1.1 + Loads all sizes of a group icon with @a resourceName stored as an MS + Windows resource in @a module. + + When @a module is 0, the current instance is used. + + @onlyfor{wxmsw} + @since 3.1.1 */ void AddIcon(const wxString& resourceName, WXHINSTANCE module); diff --git a/src/common/iconbndl.cpp b/src/common/iconbndl.cpp index c5aa48bdf4..0cb757dc60 100644 --- a/src/common/iconbndl.cpp +++ b/src/common/iconbndl.cpp @@ -19,7 +19,7 @@ #ifndef WX_PRECOMP #ifdef __WINDOWS__ #include "wx/msw/wrapwin.h" - #endif + #endif #include "wx/settings.h" #include "wx/log.h" #include "wx/intl.h" @@ -33,7 +33,7 @@ #ifdef __WINDOWS__ #include "wx/private/icondir.h" -#endif +#endif #include "wx/arrimpl.cpp" WX_DEFINE_OBJARRAY(wxIconArray) @@ -97,7 +97,7 @@ wxIconBundle::wxIconBundle(const wxIcon& icon) AddIcon(icon); } -#if defined( __WINDOWS__) && wxUSE_ICO_CUR +#if defined(__WINDOWS__) && wxUSE_ICO_CUR wxIconBundle::wxIconBundle(const wxString& resourceName, WXHINSTANCE module) : wxGDIObject() @@ -105,7 +105,7 @@ wxIconBundle::wxIconBundle(const wxString& resourceName, WXHINSTANCE module) AddIcon(resourceName, module); } -#endif // #if defined( __WINDOWS__) && wxUSE_ICO_CUR +#endif // defined(__WINDOWS__) && wxUSE_ICO_CUR wxGDIRefData *wxIconBundle::CreateGDIRefData() const { @@ -210,7 +210,7 @@ void wxIconBundle::AddIcon(wxInputStream& stream, wxBitmapType type) #endif // wxUSE_STREAMS && wxUSE_IMAGE -#if defined( __WINDOWS__) && wxUSE_ICO_CUR +#if defined(__WINDOWS__) && wxUSE_ICO_CUR // Loads all the icons for an icon group (i.e., different sizes of one icon) // stored as an MS Windows resource. @@ -228,7 +228,7 @@ void wxIconBundle::AddIcon(const wxString& resourceName, WXHINSTANCE module) // load the individual icons referred from the icon directory const GRPICONDIR* grpIconDir = static_cast(data); - + for ( WORD i = 0; i < grpIconDir->idCount; i++ ) { const WORD iconID = grpIconDir->idEntries[i].nID; @@ -251,7 +251,7 @@ void wxIconBundle::AddIcon(const wxString& resourceName, WXHINSTANCE module) } } -#endif // #if defined( __WINDOWS__) && wxUSE_ICO_CUR +#endif // defined(__WINDOWS__) && wxUSE_ICO_CUR wxIcon wxIconBundle::GetIcon(const wxSize& size, int flags) const {