Skip to content

Conversation

@jjuhl
Copy link
Contributor

@jjuhl jjuhl commented Jan 24, 2026

Hi Texus

Just a few small, relatively trivial, commits for you :)

/Jesper Juhl

jjuhl added 3 commits January 25, 2026 02:49
There's not much we can do about the error, but we can at least throw
an exception rather than just carrying on as if everything is fine.
Also make 'closeFileFunc' const just because it can be.
A number of enum classes can be a lot smaller by specifying a smaller
underlying type (and they don't need the big range of the large
default type).
@texus
Copy link
Owner

texus commented Jan 25, 2026

Thanks. I don't like having the body on the same line as the if statement though, so for the fclose call I would prefer seeing something like this:

const auto closeFileFunc = [](FILE* fp){
    if (fclose(fp))
        throw tgui::Exception{U"Failed to fclose file, error: " + tgui::String(std::system_error(errno, std::generic_category()).what())};
};

@texus texus closed this in f923079 Jan 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants