Daemon icon indicating copy to clipboard operation
Daemon copied to clipboard

use explicit wording for reading cvar value

Open illwieckz opened this issue 1 year ago • 6 comments

hOw DiD wE mIsSeD tHaT fOr So lOnG? 🤔️

illwieckz avatar Mar 22 '24 15:03 illwieckz

I think this code works fine...

https://github.com/DaemonEngine/Daemon/blob/895cb2c071ca4c0ed69f42e77c147a1d70d3183d/src/common/Cvar.h#L123

Means that * is overloaded to call Get()

Ah… Well, I prefer explicit code. 🤷‍♀️️

illwieckz avatar Apr 06 '24 17:04 illwieckz

I renamed the commit renderer: use explicit wording for reading cvar value.

illwieckz avatar Apr 06 '24 17:04 illwieckz

Should we nuke operator*?

slipher avatar Apr 06 '24 22:04 slipher

Should we nuke operator*?

I was going to ask the same. I don't want to have to guess the behavior of *ptr knowing it may differ according to the object type. It seems to just add extra mental load only to save on characters and allowing some kind of obfsucated code golf…

So if someone nukes it, I will approve…

illwieckz avatar Apr 06 '24 23:04 illwieckz

I added a commit to NUKE the confusing *cvar syntax, it was used nowhere else.

illwieckz avatar Apr 21 '24 15:04 illwieckz

LGTM

slipher avatar Apr 21 '24 19:04 slipher