diff --git a/examples/cocoa/CocoaAppDelegate.h b/examples/cocoa/CocoaAppDelegate.h index 6c6f51679..cca0dccf7 100644 --- a/examples/cocoa/CocoaAppDelegate.h +++ b/examples/cocoa/CocoaAppDelegate.h @@ -37,6 +37,7 @@ struct SFMLmainWindow; +// NOLINTBEGIN(readability-identifier-naming) @interface CocoaAppDelegate : NSObject { @private @@ -48,6 +49,7 @@ struct SFMLmainWindow; BOOL m_visible; BOOL m_initialized; } +// NOLINTEND(readability-identifier-naming) @property (retain) IBOutlet NSWindow* window; diff --git a/examples/cocoa/CocoaAppDelegate.mm b/examples/cocoa/CocoaAppDelegate.mm index c0bd8dc70..45b9e3f19 100644 --- a/examples/cocoa/CocoaAppDelegate.mm +++ b/examples/cocoa/CocoaAppDelegate.mm @@ -41,7 +41,7 @@ struct SFMLmainWindow { SFMLmainWindow(sf::WindowHandle win) : renderWindow(win) { - std::filesystem::path resPath = [[[NSBundle mainBundle] resourcePath] tostdstring]; + const std::filesystem::path resPath = [[[NSBundle mainBundle] resourcePath] tostdstring]; if (!logo.loadFromFile(resPath / "logo.png")) NSLog(@"Couldn't load the logo image"); @@ -144,7 +144,7 @@ struct SFMLmainWindow self.textField = nil; delete static_cast(self.mainWindow); - self.mainWindow = 0; + self.mainWindow = nil; self.renderTimer = nil; [super dealloc]; diff --git a/examples/cocoa/NSString+stdstring.mm b/examples/cocoa/NSString+stdstring.mm index 852966c28..1f6dc3fb4 100644 --- a/examples/cocoa/NSString+stdstring.mm +++ b/examples/cocoa/NSString+stdstring.mm @@ -43,7 +43,7 @@ + (id)stringWithstdwstring:(const std::wstring&)string { const void* data = static_cast(string.data()); - unsigned size = static_cast(string.size() * sizeof(wchar_t)); + auto size = static_cast(string.size() * sizeof(wchar_t)); NSString* str = [[[NSString alloc] initWithBytes:data length:size encoding:NSUTF32LittleEndianStringEncoding] autorelease];