diff --git a/src/python/magnum/trade.cpp b/src/python/magnum/trade.cpp index 32b2dd8..0d474cd 100644 --- a/src/python/magnum/trade.cpp +++ b/src/python/magnum/trade.cpp @@ -243,8 +243,10 @@ template(Trade::AbstractImporter::*f)(UnsignedI return *std::move(out); } +/* Can't be named just checkResult() because the AbstractSceneConverter + overload would confuse GCC 4.8 */ /** @todo drop std::string in favor of our own string caster */ -template void checkResult(Trade::AbstractImageConverter& self, const T& image, const std::string& filename) { +template void checkImageConverterResult(Trade::AbstractImageConverter& self, const T& image, const std::string& filename) { /** @todo log redirection -- but we'd need assertions to not be part of that so when it dies, the user can still see why */ bool out = (self.*f)(image, filename); @@ -254,8 +256,10 @@ template void checkResult(Trade::AbstractSceneConverter& self, const T& mesh, const std::string& filename) { +template void checkSceneConverterResult(Trade::AbstractSceneConverter& self, const T& mesh, const std::string& filename) { /** @todo log redirection -- but we'd need assertions to not be part of that so when it dies, the user can still see why */ bool out = (self.*f)(mesh, filename); @@ -346,9 +350,9 @@ void trade(py::module_& m) { /* Image converter */ py::class_> abstractImageConverter{m, "AbstractImageConverter", "Interface for image converter plugins"}; abstractImageConverter - .def("convert_to_file", checkResult, "Convert a 1D image to a file", py::arg("image"), py::arg("filename")) - .def("convert_to_file", checkResult, "Convert a 2D image to a file", py::arg("image"), py::arg("filename")) - .def("convert_to_file", checkResult, "Convert a 3D image to a file", py::arg("image"), py::arg("filename")); + .def("convert_to_file", checkImageConverterResult, "Convert a 1D image to a file", py::arg("image"), py::arg("filename")) + .def("convert_to_file", checkImageConverterResult, "Convert a 2D image to a file", py::arg("image"), py::arg("filename")) + .def("convert_to_file", checkImageConverterResult, "Convert a 3D image to a file", py::arg("image"), py::arg("filename")); corrade::plugin(abstractImageConverter); py::class_, PluginManager::AbstractManager> imageConverterManager{m, "ImageConverterManager", "Manager for image converter plugins"}; @@ -357,7 +361,7 @@ void trade(py::module_& m) { /* Scene converter */ py::class_> abstractSceneConverter{m, "AbstractSceneConverter", "Interface for scene converter plugins"}; abstractSceneConverter - .def("convert_to_file", checkResult, "Convert a mesh to a file", py::arg("mesh"), py::arg("filename")); + .def("convert_to_file", checkSceneConverterResult, "Convert a mesh to a file", py::arg("mesh"), py::arg("filename")); corrade::plugin(abstractSceneConverter); py::class_, PluginManager::AbstractManager> sceneConverterManager{m, "SceneConverterManager", "Manager for scene converter plugins"};