RobLoach / raylib-cpp

C++ Object Oriented Wrapper for raylib
https://robloach.github.io/raylib-cpp/
zlib License
669 stars 87 forks source link

Add default constructors for BoundingBox and Model #205

Closed TokyoSU closed 2 years ago

TokyoSU commented 2 years ago

(This PR come from #198) This is not finished, i will add more later :) PS: you can also check the progress here.

RobLoach commented 2 years ago

I think this is pretty good to merge as is :wink:

TokyoSU commented 2 years ago

not really, there is more like window, audio etc.. that need it too

EDIT: do you think changing bool to void would change something ? like:

bool Init(int width = 800, int height = 450, const std::string& title = "raylib") {
    ::InitWindow(width, height, title.c_str());
    if (!IsWindowReady()) {
        throw RaylibException("Failed to create Window");
    }
    return IsWindowReady();
}

to

void Init(int width = 800, int height = 450, const std::string& title = "raylib") {
    ::InitWindow(width, height, title.c_str());
    if (!IsWindowReady()) {
        throw RaylibException("Failed to create Window");
    }
}

since throw would already take care of error ?

RobLoach commented 2 years ago

That would seem appropriate. Good thinking :+1: