aboutsummaryrefslogtreecommitdiff
path: root/src/entity.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2019-08-23 10:32:05 +0100
committergingerBill <bill@gingerbill.org>2019-08-23 10:32:05 +0100
commitd1cc6534cdb25c95f948a81e863f9348dfb5122e (patch)
tree1ff4d9feca3d8f3422583e0d165c2b60e31d5af4 /src/entity.cpp
parent1b454c7deddaf7c2c121fa60b895ac50b594fa3b (diff)
Remove the rule that made any declaration prefixed with an underscore private to that package.
Diffstat (limited to 'src/entity.cpp')
-rw-r--r--src/entity.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/entity.cpp b/src/entity.cpp
index 0c05a9bf6..78726171d 100644
--- a/src/entity.cpp
+++ b/src/entity.cpp
@@ -184,10 +184,11 @@ bool is_entity_exported(Entity *e, bool allow_builtin = false) {
}
String name = e->token.string;
- if (name.len == 0) {
- return false;
+ switch (name.len) {
+ case 0: return false;
+ case 1: return name[0] != '_';
}
- return name[0] != '_';
+ return true;
}
bool entity_has_deferred_procedure(Entity *e) {