From c52b9736009a510d7f195a28289f437c8155ad8c Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sun, 3 Sep 2017 14:38:03 +0100 Subject: tryConvert* should get the converstion function as a pointer --- slicer/tool/parser.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/slicer/tool/parser.cpp b/slicer/tool/parser.cpp index 8e37dfc..4458661 100644 --- a/slicer/tool/parser.cpp +++ b/slicer/tool/parser.cpp @@ -56,7 +56,7 @@ namespace Slicer { fprintbf(cpp, "\tBOOST_ASSERT(Model);\n"); for (const auto & conversion : conversions) { - fprintbf(cpp, "\tif (tryConvertFrom< %s >(vsp, Model, %s)) return;\n", + fprintbf(cpp, "\tif (tryConvertFrom< %s >(vsp, Model, &%s)) return;\n", conversion.ExchangeType, conversion.ConvertToModelFunc); } @@ -76,7 +76,7 @@ namespace Slicer { fprintbf(cpp, "\tBOOST_ASSERT(Model);\n"); for (const auto & conversion : conversions) { - fprintbf(cpp, "\tif (tryConvertTo< %s >(vtp, Model, %s)) return;\n", + fprintbf(cpp, "\tif (tryConvertTo< %s >(vtp, Model, &%s)) return;\n", conversion.ExchangeType, conversion.ConvertToExchangeFunc); } -- cgit v1.2.3