mirror of
https://github.com/stan220/godot-docs.git
synced 2026-09-08 18:29:11 +00:00
Merge pull request #6666 from Calinou/shader-preprocessor-undefine-unexisting
Clarify `#undef` behavior on non-existing defines in Shader preprocessor
This commit is contained in:
@@ -111,6 +111,10 @@ The ``#undef`` directive may be used to cancel a previously defined ``#define``
|
||||
return MY_COLOR;
|
||||
}
|
||||
|
||||
// Like in most preprocessors, undefining a define that was not previously defined is allowed
|
||||
// (and won't print any warning or error).
|
||||
#undef THIS_DOES_NOT_EXIST
|
||||
|
||||
Without ``#undef`` in the above example, there would be a macro redefinition error.
|
||||
|
||||
#if
|
||||
|
||||
Reference in New Issue
Block a user