diff options
author | Mark Spruiell <mes@zeroc.com> | 2017-10-11 16:44:17 -0700 |
---|---|---|
committer | Mark Spruiell <mes@zeroc.com> | 2017-10-11 16:44:17 -0700 |
commit | 17c4a4c4fc743911404fd147da88f33a001f218f (patch) | |
tree | 4e9ac3178835699c606c84d938a8ac44590ba132 /cpp/src/slice2matlab/Main.cpp | |
parent | Package and build fixes (diff) | |
download | ice-17c4a4c4fc743911404fd147da88f33a001f218f.tar.bz2 ice-17c4a4c4fc743911404fd147da88f33a001f218f.tar.xz ice-17c4a4c4fc743911404fd147da88f33a001f218f.zip |
Remove package metadata; test cleanup
Diffstat (limited to 'cpp/src/slice2matlab/Main.cpp')
-rw-r--r-- | cpp/src/slice2matlab/Main.cpp | 32 |
1 files changed, 1 insertions, 31 deletions
diff --git a/cpp/src/slice2matlab/Main.cpp b/cpp/src/slice2matlab/Main.cpp index b1c9a8757c4..733b8c05c6b 100644 --- a/cpp/src/slice2matlab/Main.cpp +++ b/cpp/src/slice2matlab/Main.cpp @@ -278,31 +278,6 @@ openClass(const string& abs, const string& dir, IceUtilInternal::Output& out) map<string, string> _filePackagePrefix; -string -getPackagePrefix(const ContainedPtr& cont) -{ - UnitPtr unit = cont->container()->unit(); - string file = cont->file(); - assert(!file.empty()); - - map<string, string>::const_iterator p = _filePackagePrefix.find(file); - if(p != _filePackagePrefix.end()) - { - return p->second; - } - - static const string prefix = "matlab:package:"; - DefinitionContextPtr dc = unit->findDefinitionContext(file); - assert(dc); - string q = dc->findMetaData(prefix); - if(!q.empty()) - { - q = q.substr(prefix.size()); - } - _filePackagePrefix[file] = q; - return q; -} - // // Get the fully-qualified name of the given definition. If a suffix is provided, // it is prepended to the definition's unqualified name. If the nameSuffix @@ -311,12 +286,7 @@ getPackagePrefix(const ContainedPtr& cont) string getAbsolute(const ContainedPtr& cont, const string& pfx = std::string(), const string& suffix = std::string()) { - string pkg = getPackagePrefix(cont); - if(!pkg.empty()) - { - pkg += "."; - } - return pkg + scopedToName(cont->scope() + pfx + cont->name() + suffix); + return scopedToName(cont->scope() + pfx + cont->name() + suffix); } string |