| 930 | } |
| 931 | |
| 932 | asSNameSpace *asCBuilder::FindNextVisibleNamespace(const asCArray<asSNameSpace*>& visited, asCArray<asSNameSpace*>& pending, asSNameSpace *parentNs, bool* checkAmbiguous) |
| 933 | { |
| 934 | // First iterate through all pending namespaces that have been included with 'using namespace' |
| 935 | asSNameSpace* nextNs = 0; |
| 936 | while ( pending.GetLength() != 0 ) |
| 937 | { |
| 938 | asSNameSpace *candidate = pending.PopLast(); |
| 939 | if (!visited.Exists(candidate)) |
| 940 | { |
| 941 | nextNs = candidate; |
| 942 | break; |
| 943 | } |
| 944 | } |
| 945 | |
| 946 | // Even if the parent namespace has already been visited, it still needs to be traversed |
| 947 | if (nextNs == 0) |
| 948 | nextNs = parentNs; |
| 949 | |
| 950 | if (checkAmbiguous && !(*checkAmbiguous)) |
| 951 | *checkAmbiguous = nextNs == engine->nameSpaces[0]; |
| 952 | |
| 953 | return nextNs; |
| 954 | } |
| 955 | |
| 956 | #ifndef AS_NO_COMPILER |
| 957 | void asCBuilder::RegisterNonTypesFromScript(asCScriptNode *node, asCScriptCode *script, asSNameSpace *ns) |
no test coverage detected