Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
45 user(s) are online (28 user(s) are browsing Forums)

Members: 1
Guests: 44

billyfish, more...

Support us!

Headlines

Report message:*
 

Re: Porting to AmigaOS4 thread

Subject: Re: Porting to AmigaOS4 thread
by Capehill on 2020/11/22 12:26:49

@Raziel

Quote:

struct Library *AslBase = IExec->OpenLibrary(AslName, 50);


Don't open the library here.

Quote:

struct Library *AslBase;


Is enough. AslBase shall be initialized to nullptr because it's a global variable.

Then open the library inside the showFileBrowser(), instead of:

Quote:

AslBase = IExec->OpenLibrary(AslName, 50);
if (AslBase) ...


Cosmetic: probably those NULLs should be converted to nullptr (not sure, check ScummVM coding guidelines). nullptr is what modern C++ prefers.

Quote:

backends/dialogs/amigaos/amigaos-dialogs.cpp:111:56: warning: cast from type 'const value_type*' {aka 'const char*'} to type 'char*' casts away qualifiers [-Wcast-qual]
char *newTitle = utf8ToLocal((char *)utf8Title.c_str());


Try to remove (char*) casting, it's bad. If utf8ToLocal doesn't modify "newTitle" cast unnecessary and in that case utf8ToLocal() should take "const char*" input parameter instead of "char*".





Powered by XOOPS 2.0 © 2001-2016 The XOOPS Project