NewayPix / hazard-memory

An experimental SDL2 Game Engine written in C++
MIT License
0 stars 0 forks source link

Reinforce good C++ practices #11

Closed rafaelcn closed 4 years ago

rafaelcn commented 4 years ago

The NULL is not statically typed and does not provide the safety that C++ brings with C++11 when comparing pointers. Thus, the change was done to improve code in this aspect.

A change on the Makefile is on its way , do not merge this yet.

rafaelcn commented 4 years ago

I will change the changelog for this PR later.

ryukinix commented 4 years ago

Hey, merging #8 is not a good idea. I'll squash all that 20 commits into a single one when merge. We'll suffer with merge conflicts

rafaelcn commented 4 years ago

@ryukinix, hey have a look at the latest update and either approve or ... :tongue:

ryukinix commented 4 years ago

@ryukinix, hey have a look at the latest update and either approve or ... tongue

It seems fucked. We have duplicated commits.

D:

I can push force again to fix it. I think you merged the rebased commits with your local commits. In that cases, if you don't use git pull --force, use that:

git reset --hard origin/dev
ryukinix commented 4 years ago

image the git tree is totally fucked

rafaelcn commented 4 years ago

How about a rebase with picking those two commits?

ryukinix commented 4 years ago

image Git tree fixed, be careful!

ryukinix commented 4 years ago

About the branch name, we currently are using gitflow as: master + feature-branchs. So In the next maybe you could create a more descriptive branch name with a clear scope like: fix/null-to-nullptr or something like that.

The idea is the PR being specific, atomic and with only one subject.

rafaelcn commented 4 years ago

Noted!

ryukinix commented 4 years ago

How about a rebase with picking those two commits?

That would work, but be careful to select the correct commits since they are duplicated. I'd suggest that just git pull --force it's more easy. If you already tried that, maybe you don't set config pull.rebase = true, só git pull --force --rebase maybe is necessary.

ryukinix commented 4 years ago

@rafaelcn since this PR maybe has a broad subject than "Change pointers from NULL to nullptr" I think you can change to something like "Reforce good C++ practices"