mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-27 12:11:15 -03:00
Convert constant macros to constexpr expressions
Also convert some `const[expr] static xxx` to `const[expr] xxx` where it makes sense to let the compiler deduce on its own whether or not to allocate storage for a constant variable rather than imposing our view that it should have STATIC storage set aside for it. A few call sites were not making use of the `XXX_LEN` definitions and were calling `strlen(XXX)` - these have been updated to use `const_strlen(XXX)` instead. I'm not sure if any toolchains will have raise any issues with these changes... CI will tell!
This commit is contained in:
@@ -30,7 +30,7 @@
|
||||
/// Time in milliseconds to wait for another byte to be available for reading
|
||||
/// after \x1B is read before assuming that escape key was pressed, and not an
|
||||
/// escape sequence.
|
||||
#define WAIT_ON_ESCAPE_DEFAULT 30
|
||||
constexpr int WAIT_ON_ESCAPE_DEFAULT = 30;
|
||||
static int wait_on_escape_ms = WAIT_ON_ESCAPE_DEFAULT;
|
||||
|
||||
input_event_queue_t::input_event_queue_t(int in) : in_(in) {}
|
||||
|
||||
Reference in New Issue
Block a user