replace #define with const for safer C++