[PATCH vkd3d v3 2/4] vkd3d-shader: Implement basic support for #if and #endif.
Matteo Bruni
mbruni at codeweavers.com
Mon Dec 21 03:11:27 CST 2020
Signed-off-by: Matteo Bruni <mbruni at codeweavers.com>
---
Apparently I never got the email so I'm adding a couple of comments
right here...
preproc_was_writing() manages to trigger my review alarms every
time. The function is definitely correct though, and clearly so after
patch 4/4. So nothing to do but ignore the alarm.
+static uint32_t preproc_parse_integer(const char *s)
+{
+ uint32_t base = 10, ret = 0;
+ int digit;
+
+ if (s[0] == '0')
+ {
+ base = 8;
I'd "++s;" here
+ if (s[1] == 'x' || s[1] == 'X')
+ {
+ base = 16;
+ s += 2;
And then replace this one with another "++s;" (fixing up the if
condition above to now check *s).
+ }
+ }
+
+ while ((digit = char_to_int(*s++)) >= 0)
+ ret = ret * base + (uint32_t)digit;
+ return ret;
+}
AFAICS this should still work. It's all just a nitpick, it doesn't
really matter.
More information about the wine-devel
mailing list