Index: tools/gn/source_file_type.h |
diff --git a/tools/gn/source_file_type.h b/tools/gn/source_file_type.h |
index f738daacb4602957bb8ca72730fc7229b8d61505..315a87d2fd0746a91dbdccbef0968a501e1c34f7 100644 |
--- a/tools/gn/source_file_type.h |
+++ b/tools/gn/source_file_type.h |
@@ -7,8 +7,10 @@ |
class SourceFile; |
+// This should be sequential integers starting from 0 so they can be used as |
+// array indices. |
enum SourceFileType { |
- SOURCE_UNKNOWN, |
+ SOURCE_UNKNOWN = 0, |
SOURCE_ASM, |
SOURCE_C, |
SOURCE_CC, |
scottmg
2015/06/26 22:30:13
_CPP might be better to be less confusing with too
brettw
2015/06/29 21:36:10
Good idea, I found this confusing myself.
|
@@ -19,6 +21,9 @@ enum SourceFileType { |
SOURCE_RC, |
SOURCE_O, // Object files can be inputs, too. Also counts .obj. |
SOURCE_DEF, |
+ |
+ // Must be last. |
+ SOURCE_NUMTYPES, |
}; |
SourceFileType GetSourceFileType(const SourceFile& file); |