From ff2b0065aa7de98adb50d15d8b4e999f56b1a06d Mon Sep 17 00:00:00 2001 From: Jose Date: Tue, 23 Oct 2018 15:10:49 +0200 Subject: Fixed slice2matlab generated code type for dictionary data members Close #256 --- cpp/src/slice2matlab/Main.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'cpp/src/slice2matlab/Main.cpp') diff --git a/cpp/src/slice2matlab/Main.cpp b/cpp/src/slice2matlab/Main.cpp index 051e37b76ac..c673feb482b 100644 --- a/cpp/src/slice2matlab/Main.cpp +++ b/cpp/src/slice2matlab/Main.cpp @@ -362,7 +362,11 @@ typeToString(const TypePtr& type) DictionaryPtr dict = DictionaryPtr::dynamicCast(type); if(dict) { - if(!StructPtr::dynamicCast(dict->keyType())) + if(StructPtr::dynamicCast(dict->keyType())) + { + return "struct"; + } + else { return "containers.Map"; } @@ -3599,7 +3603,7 @@ CodeVisitor::visitDictionary(const DictionaryPtr& p) if(cls || convert) { - out << nl << "function r = convert(d, obj)"; + out << nl << "function r = convert(d)"; out.inc(); if(st) { -- cgit v1.2.3