mirror of
https://github.com/SFML/SFML.git
synced 2024-11-24 20:31:05 +08:00
Fix clang-tidy errors
This commit is contained in:
parent
a1c3aa14cb
commit
36e7a18881
@ -37,6 +37,7 @@
|
||||
|
||||
struct SFMLmainWindow;
|
||||
|
||||
// NOLINTBEGIN(readability-identifier-naming)
|
||||
@interface CocoaAppDelegate : NSObject<NSApplicationDelegate>
|
||||
{
|
||||
@private
|
||||
@ -48,6 +49,7 @@ struct SFMLmainWindow;
|
||||
BOOL m_visible;
|
||||
BOOL m_initialized;
|
||||
}
|
||||
// NOLINTEND(readability-identifier-naming)
|
||||
|
||||
@property (retain) IBOutlet NSWindow* window;
|
||||
|
||||
|
@ -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<SFMLmainWindow*>(self.mainWindow);
|
||||
self.mainWindow = 0;
|
||||
self.mainWindow = nil;
|
||||
self.renderTimer = nil;
|
||||
|
||||
[super dealloc];
|
||||
|
@ -43,7 +43,7 @@
|
||||
+ (id)stringWithstdwstring:(const std::wstring&)string
|
||||
{
|
||||
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
|
||||
encoding:NSUTF32LittleEndianStringEncoding] autorelease];
|
||||
|
Loading…
Reference in New Issue
Block a user