pokitto / PokittoLib

Library for making programs on Pokitto hardware
22 stars 16 forks source link

Fix for DISABLEAVRMIN not working. #25

Closed mhughson closed 6 years ago

mhughson commented 6 years ago

Added needed includes to library, and fix some missing casts required for templated version of min/max.

Not sure if this is the proper way to fix this? I also can't test if it works without DISABLEAVRMIN, since that doesn't compile for me.

Pharap commented 6 years ago

Personally I thinkit would be better to bring only the desired functions into scope and not the whole std namespace.

i.e.

using std::min;
using std::max;
Pharap commented 6 years ago

Much better. This tackles the issue more precisely and completely avoids potentially unexpected side effects like name clashes.