Fixed tiny style issues.
This commit is contained in:
parent
9ba19e34a2
commit
b1dc62a554
@ -47,16 +47,12 @@ NSString* sfStringToNSString(sf::String const& string)
|
|||||||
sf::Uint32 length = string.getSize() * sizeof(sf::Uint32);
|
sf::Uint32 length = string.getSize() * sizeof(sf::Uint32);
|
||||||
const void* data = reinterpret_cast<const void*>(string.getData());
|
const void* data = reinterpret_cast<const void*>(string.getData());
|
||||||
|
|
||||||
NSStringEncoding sfEncoding;
|
NSStringEncoding encoding;
|
||||||
if (NSHostByteOrder() == NS_LittleEndian)
|
if (NSHostByteOrder() == NS_LittleEndian)
|
||||||
{
|
encoding = NSUTF32LittleEndianStringEncoding;
|
||||||
sfEncoding = NSUTF32LittleEndianStringEncoding;
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
encoding = NSUTF32BigEndianStringEncoding;
|
||||||
sfEncoding = NSUTF32BigEndianStringEncoding;
|
|
||||||
}
|
|
||||||
|
|
||||||
NSString* str = [[NSString alloc] initWithBytes:data length:length encoding:sfEncoding];
|
NSString* str = [[NSString alloc] initWithBytes:data length:length encoding:encoding];
|
||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user