зеркало из https://github.com/github/ruby.git
Explicit conversion to boolean to suppress shorten-64-to-32 warnings
This commit is contained in:
Родитель
a82252df42
Коммит
4989987419
|
@ -398,14 +398,14 @@ VALUE rb_debug_counter_show(VALUE klass);
|
||||||
|
|
||||||
#define RB_DEBUG_COUNTER_INC(type) rb_debug_counter_add(RB_DEBUG_COUNTER_##type, 1, 1)
|
#define RB_DEBUG_COUNTER_INC(type) rb_debug_counter_add(RB_DEBUG_COUNTER_##type, 1, 1)
|
||||||
#define RB_DEBUG_COUNTER_INC_UNLESS(type, cond) (!rb_debug_counter_add(RB_DEBUG_COUNTER_##type, 1, !(cond)))
|
#define RB_DEBUG_COUNTER_INC_UNLESS(type, cond) (!rb_debug_counter_add(RB_DEBUG_COUNTER_##type, 1, !(cond)))
|
||||||
#define RB_DEBUG_COUNTER_INC_IF(type, cond) rb_debug_counter_add(RB_DEBUG_COUNTER_##type, 1, (cond))
|
#define RB_DEBUG_COUNTER_INC_IF(type, cond) rb_debug_counter_add(RB_DEBUG_COUNTER_##type, 1, !!(cond))
|
||||||
#define RB_DEBUG_COUNTER_ADD(type, num) rb_debug_counter_add(RB_DEBUG_COUNTER_##type, (num), 1)
|
#define RB_DEBUG_COUNTER_ADD(type, num) rb_debug_counter_add(RB_DEBUG_COUNTER_##type, (num), 1)
|
||||||
#define RB_DEBUG_COUNTER_SETMAX(type, num) rb_debug_counter_max(RB_DEBUG_COUNTER_##type, (unsigned int)(num))
|
#define RB_DEBUG_COUNTER_SETMAX(type, num) rb_debug_counter_max(RB_DEBUG_COUNTER_##type, (unsigned int)(num))
|
||||||
|
|
||||||
#else
|
#else
|
||||||
#define RB_DEBUG_COUNTER_INC(type) ((void)0)
|
#define RB_DEBUG_COUNTER_INC(type) ((void)0)
|
||||||
#define RB_DEBUG_COUNTER_INC_UNLESS(type, cond) (cond)
|
#define RB_DEBUG_COUNTER_INC_UNLESS(type, cond) (!!(cond))
|
||||||
#define RB_DEBUG_COUNTER_INC_IF(type, cond) (cond)
|
#define RB_DEBUG_COUNTER_INC_IF(type, cond) (!!(cond))
|
||||||
#define RB_DEBUG_COUNTER_ADD(type, num) ((void)0)
|
#define RB_DEBUG_COUNTER_ADD(type, num) ((void)0)
|
||||||
#define RB_DEBUG_COUNTER_SETMAX(type, num) 0
|
#define RB_DEBUG_COUNTER_SETMAX(type, num) 0
|
||||||
#endif
|
#endif
|
||||||
|
|
Загрузка…
Ссылка в новой задаче