Re: [hackers] [dwm][PATCH RESEND 0/2] Const-correctness fixes

From: Quentin Rameau <quinq_AT_fifth.space>
Date: Mon, 22 Aug 2022 13:03:08 +0200

Hi Laslo,

> I agree here. Not only should const be used to at least have a partial
> "contract" for the function parameters (C doesn't offer a lot in this
> regard and it's an easy way to prevent problems),

The contract is respected, the function will not modify the variable
pointed to by the pointer.

> it also allows the
> compiler to optimize the code better.

Could explain what kind of optimization is being prevented here?
Received on Mon Aug 22 2022 - 13:03:08 CEST

This archive was generated by hypermail 2.3.0 : Mon Aug 22 2022 - 13:12:35 CEST