fix macOS build (hopefully)
This commit is contained in:
parent
52328df8c3
commit
9b71dae4d9
|
@ -81,7 +81,7 @@ static nfdresult_t AllocPathSet( NSArray *urls, nfdpathset_t *pathset )
|
|||
assert([urls count]);
|
||||
|
||||
pathset->count = (size_t)[urls count];
|
||||
pathset->indices = NFDi_Malloc( sizeof(size_t)*pathset->count );
|
||||
pathset->indices = (size_t*)NFDi_Malloc( sizeof(size_t)*pathset->count );
|
||||
if ( !pathset->indices )
|
||||
{
|
||||
return NFD_ERROR;
|
||||
|
@ -95,7 +95,7 @@ static nfdresult_t AllocPathSet( NSArray *urls, nfdpathset_t *pathset )
|
|||
bufsize += [path lengthOfBytesUsingEncoding:NSUTF8StringEncoding] + 1;
|
||||
}
|
||||
|
||||
pathset->buf = NFDi_Malloc( sizeof(nfdchar_t) * bufsize );
|
||||
pathset->buf = (nfdchar_t*)NFDi_Malloc( sizeof(nfdchar_t) * bufsize );
|
||||
if ( !pathset->buf )
|
||||
{
|
||||
return NFD_ERROR;
|
||||
|
@ -151,7 +151,7 @@ nfdresult_t NFD_OpenDialog( const nfdchar_t *filterList,
|
|||
// byte count, not char count
|
||||
size_t len = strlen(utf8Path);//NFDi_UTF8_Strlen(utf8Path);
|
||||
|
||||
*outPath = NFDi_Malloc( len+1 );
|
||||
*outPath = (nfdchar_t*)NFDi_Malloc( len+1 );
|
||||
if ( !*outPath )
|
||||
{
|
||||
[pool release];
|
||||
|
@ -238,7 +238,7 @@ nfdresult_t NFD_SaveDialog( const nfdchar_t *filterList,
|
|||
|
||||
size_t byteLen = [url.path lengthOfBytesUsingEncoding:NSUTF8StringEncoding] + 1;
|
||||
|
||||
*outPath = NFDi_Malloc( byteLen );
|
||||
*outPath = (nfdchar_t*)NFDi_Malloc( byteLen );
|
||||
if ( !*outPath )
|
||||
{
|
||||
[pool release];
|
||||
|
@ -278,7 +278,7 @@ nfdresult_t NFD_PickFolder(const nfdchar_t *defaultPath,
|
|||
// byte count, not char count
|
||||
size_t len = strlen(utf8Path);//NFDi_UTF8_Strlen(utf8Path);
|
||||
|
||||
*outPath = NFDi_Malloc( len+1 );
|
||||
*outPath = (nfdchar_t*)NFDi_Malloc( len+1 );
|
||||
if ( !*outPath )
|
||||
{
|
||||
[pool release];
|
||||
|
|
Loading…
Reference in New Issue