Greetings,

Android Studio uses "ANDROID_" prefix for for ${INCLUDE_GUARD} macro when 
creating a new C++ class header.

Example:  Test.h  --> #ifndef ANDROID_TEST_H

This is confusing since the CPP sources are not ANDROID specific, "Android" 
is not in source's filename, nor is the cpp file in any Android project 
sub-directory. Source file merely happened to be created from a 
user-defined (almost) template and applied by AndroidStudio (... although, 
then, should not it be ANDROID_STUDIO_TEST_H?).

Question:
    How may I change this setting?
    Is it a MACRO defined elsewhere in Android Studio?
    (Not seeing it in the Templates, Includes, Code, or Other tabs)

Is it a hardwired value or can it be user-tweakable?

My personal preference would be to use only the source header's filename.
    Example:  Test.h   becomes   #ifndef   TEST_H

I know others who prefer to use underscores (leading/trailing/both) such as:
    #ifndef  _TEST_H
    #ifndef    TEST_H_
    #ifndef  _TEST_H_
    #ifndef __TEST_H__
    ...

(No, I do not wish to have another debate on the benefits of #pragma once.)

-- 
You received this message because you are subscribed to the Google Groups 
"adt-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to