From 2c6d0690f29913636468caab2944e2e1f1713ffa Mon Sep 17 00:00:00 2001 From: Ben Haller Date: Fri, 22 Dec 2023 13:17:19 -0500 Subject: [PATCH] fix QtSLiM issues with the new changes --- QtSLiM/QtSLiMVariableBrowser.cpp | 2 +- QtSLiM/QtSLiM_SLiMgui.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/QtSLiM/QtSLiMVariableBrowser.cpp b/QtSLiM/QtSLiMVariableBrowser.cpp index 3dff9386..1c6b2543 100644 --- a/QtSLiM/QtSLiMVariableBrowser.cpp +++ b/QtSLiM/QtSLiMVariableBrowser.cpp @@ -535,7 +535,7 @@ void QtSLiMVariableBrowser::itemExpanded(QTreeWidgetItem *item) // we used to display zero-length property values for zero-length object vectors, but don't any more int display_index = (element_index != -1) ? element_index : 0; EidosValue_Object *eidos_object_vector = static_cast(eidos_value); - EidosObject *eidos_object = eidos_object_vector->ObjectElementAtIndex(display_index, nullptr); + EidosObject *eidos_object = eidos_object_vector->ObjectElementAtIndex_NOCAST(display_index, nullptr); const EidosClass *object_class = eidos_object->Class(); const std::vector *properties = object_class->Properties(); size_t propertyCount = properties->size(); diff --git a/QtSLiM/QtSLiM_SLiMgui.cpp b/QtSLiM/QtSLiM_SLiMgui.cpp index 156a6b13..3f56b716 100644 --- a/QtSLiM/QtSLiM_SLiMgui.cpp +++ b/QtSLiM/QtSLiM_SLiMgui.cpp @@ -113,7 +113,7 @@ EidosValue_SP SLiMgui::ExecuteMethod_openDocument(EidosGlobalStringID p_method_i #pragma unused (p_method_id, p_arguments, p_interpreter) EidosValue *filePath_value = p_arguments[0].get(); - std::string file_path = Eidos_ResolvedPath(Eidos_StripTrailingSlash(filePath_value->StringAtIndex(0, nullptr))); + std::string file_path = Eidos_ResolvedPath(Eidos_StripTrailingSlash(filePath_value->StringAtIndex_NOCAST(0, nullptr))); QString filePath = QString::fromStdString(file_path); controller_->eidos_openDocument(filePath);