mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-02 04:04:19 +00:00
* [C#] Fixes issue #5399 by always including namespaces * Updated tests for code generator changes * Fixed 'As' method names
This commit is contained in:
committed by
Wouter van Oortmerssen
parent
a6be1d0d74
commit
a80db8538c
@@ -105,11 +105,9 @@ std::string BaseGenerator::LastNamespacePart(const Namespace &ns) {
|
||||
return std::string("");
|
||||
}
|
||||
|
||||
// Ensure that a type is prefixed with its namespace whenever it is used
|
||||
// outside of its namespace.
|
||||
// Ensure that a type is prefixed with its namespace.
|
||||
std::string BaseGenerator::WrapInNameSpace(const Namespace *ns,
|
||||
const std::string &name) const {
|
||||
if (CurrentNameSpace() == ns) return name;
|
||||
std::string qualified_name = qualifying_start_;
|
||||
for (auto it = ns->components.begin(); it != ns->components.end(); ++it)
|
||||
qualified_name += *it + qualifying_separator_;
|
||||
|
||||
Reference in New Issue
Block a user