[dev] [dwm][st] why use ints over bools?

From: Zac <maczac_AT_protonmail.com>
Date: Sat, 15 Jun 2024 11:54:02 +0000

In a number of spots in dwm and st I've seen the use of integers as booleans. e.g.
- dwm.c line 95, 140, 1870
- drw.c line 252
- st.c line 44, 48

That's not an extensive list; just some examples.

I'm curious why you use ints though. Because bools are 31 bits smaller than ints, which is 31 bits of memory saved. Not that 31 bits is very much, but still...
Received on Sat Jun 15 2024 - 13:54:02 CEST

This archive was generated by hypermail 2.3.0 : Sat Jun 15 2024 - 14:00:09 CEST