Skip to content

Commit 45e2cdb

Browse files
committed
vdisp/gl: FEATURE_PRESENT simplified
strcmp not actually required, just compare first char (1 or '\0') Mentioned by CID 899145 (pointless comparison, after preprocesor expansion) but most likely won't fix that (but doesn't need to be fixed, anyways).
1 parent 8eac41a commit 45e2cdb

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/video_display/gl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -572,7 +572,7 @@ gl_print_current_platform()
572572
}
573573
#endif // not defined GLFW_PLATFORM
574574

575-
#define FEATURE_PRESENT(x) (strcmp(STRINGIFY(x), "1") == 0 ? "on" : "off")
575+
#define FEATURE_PRESENT(x) (STRINGIFY(x)[0] == 1 ? "on" : "off")
576576

577577
/**
578578
* Show help

0 commit comments

Comments
 (0)