diasurgical / devilutionX

Diablo build for modern operating systems
Other
8.09k stars 794 forks source link

Cleanup manual value clamping #1666

Open AJenbo opened 3 years ago

AJenbo commented 3 years ago

The code is littered with conditions that check that values do not go over or under the min/max range.

This is relatively easy but tedious to clean up, but doing so greatly helps the readability of the code.

An example of such cleanups in inv.cpp and a couple of other files: https://github.com/diasurgical/devilutionX/pull/1665

mpanneton commented 3 years ago

Hi I'm available to clean up the code. Before I start I would like to know if there is a specific branch for this issue or should I create my own?

AJenbo commented 3 years ago

You should create your own, please send regular pull requests where you clean up one function/file at a time to make require quick and easy.