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

From: Страхиња Радић <contact_AT_strahinja.org>
Date: Sat, 15 Jun 2024 21:06:41 +0200

Дана 24/06/15 11:54AM, Zac написа:
> 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...

https://suckless.org/coding_style/

> Tests and Boolean Values
>
> * Do not use C99 bool types (stick to integer types).
>
> * Otherwise use compound assignment and tests unless the line grows too long:
>
> if (!(p = malloc(sizeof(*p))))
> hcf();
Received on Sat Jun 15 2024 - 21:06:41 CEST

This archive was generated by hypermail 2.3.0 : Sat Jun 15 2024 - 21:12:09 CEST