cgmb / guardonce

Utilities for converting from C/C++ include guards to #pragma once and back again.
MIT License
142 stars 3 forks source link

Add processing another guard case #30

Closed Reishu closed 5 years ago

Reishu commented 6 years ago

Add processing another guard case for example from our legacy

if !defined(CONVERTER_H)

define CONVERTER_H

cgmb commented 6 years ago

That should be pretty straightforward to add in guard2once and checkguard. I'll add support for that style and maybe cut a release next week.

If you were to convert back to guards in the future, would #ifndef be acceptable? Or is there something important about #if !defined? If the difference is unimportant, I might not bother adding the ability to generate that style of guard to once2guard.

Reishu commented 6 years ago

Convert back unimportant. ifndeffully equal #if !defined. Our legacy have mix of this ( very old code. many bad practice )

Thank you I have already made a replacement for `ifndef . Great work.