Dscanner: intentionally unused variable

Ivan Trombley itrombley at dot-borg.org
Sun Jan 7 00:18:27 UTC 2018


While working with SDL, I found that I kept using the same 
pattern over and over:
- Get the current clip rectangle.
- Set a new clip rectangle.
- restore the old clip rectangle on scope (exit).

Instead of writing that code again and again, I wrote a simple 
function that returns a struct which restores the old clip 
rectangle in it's destructor. This works great but now dscanner 
complains about the variable being unused.

Is there a way tell dscanner that a variable is intentionally 
unused?


More information about the Digitalmars-d mailing list