mirror of
https://github.com/SFML/SFML.git
synced 2025-02-18 06:18:01 +08:00
Fix clang-tidy errors
This commit is contained in:
parent
a1c3aa14cb
commit
36e7a18881
@ -37,6 +37,7 @@
|
|||||||
|
|
||||||
struct SFMLmainWindow;
|
struct SFMLmainWindow;
|
||||||
|
|
||||||
|
// NOLINTBEGIN(readability-identifier-naming)
|
||||||
@interface CocoaAppDelegate : NSObject<NSApplicationDelegate>
|
@interface CocoaAppDelegate : NSObject<NSApplicationDelegate>
|
||||||
{
|
{
|
||||||
@private
|
@private
|
||||||
@ -48,6 +49,7 @@ struct SFMLmainWindow;
|
|||||||
BOOL m_visible;
|
BOOL m_visible;
|
||||||
BOOL m_initialized;
|
BOOL m_initialized;
|
||||||
}
|
}
|
||||||
|
// NOLINTEND(readability-identifier-naming)
|
||||||
|
|
||||||
@property (retain) IBOutlet NSWindow* window;
|
@property (retain) IBOutlet NSWindow* window;
|
||||||
|
|
||||||
|
@ -41,7 +41,7 @@ struct SFMLmainWindow
|
|||||||
{
|
{
|
||||||
SFMLmainWindow(sf::WindowHandle win) : renderWindow(win)
|
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"))
|
if (!logo.loadFromFile(resPath / "logo.png"))
|
||||||
NSLog(@"Couldn't load the logo image");
|
NSLog(@"Couldn't load the logo image");
|
||||||
|
|
||||||
@ -144,7 +144,7 @@ struct SFMLmainWindow
|
|||||||
self.textField = nil;
|
self.textField = nil;
|
||||||
|
|
||||||
delete static_cast<SFMLmainWindow*>(self.mainWindow);
|
delete static_cast<SFMLmainWindow*>(self.mainWindow);
|
||||||
self.mainWindow = 0;
|
self.mainWindow = nil;
|
||||||
self.renderTimer = nil;
|
self.renderTimer = nil;
|
||||||
|
|
||||||
[super dealloc];
|
[super dealloc];
|
||||||
|
@ -43,7 +43,7 @@
|
|||||||
+ (id)stringWithstdwstring:(const std::wstring&)string
|
+ (id)stringWithstdwstring:(const std::wstring&)string
|
||||||
{
|
{
|
||||||
const void* data = static_cast<const void*>(string.data());
|
const void* data = static_cast<const void*>(string.data());
|
||||||
unsigned size = static_cast<unsigned>(string.size() * sizeof(wchar_t));
|
auto size = static_cast<unsigned>(string.size() * sizeof(wchar_t));
|
||||||
|
|
||||||
NSString* str = [[[NSString alloc] initWithBytes:data length:size
|
NSString* str = [[[NSString alloc] initWithBytes:data length:size
|
||||||
encoding:NSUTF32LittleEndianStringEncoding] autorelease];
|
encoding:NSUTF32LittleEndianStringEncoding] autorelease];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user