* .gitignore: Remove redundant entry
* Minor optimizations with ternary operators
* Use `const` instead of `define()` where appropriate
`const` is quite faster because of the compile-time optimizations. Because the replaced statements are not declaring constant conditionally, it's safe to use `const` in all of these places.
Closes GH-608.