From 037ff6a969d8ffa5a30fc8e0b0340d250a21edf7 Mon Sep 17 00:00:00 2001 From: Pierre Kraemer Date: Tue, 3 Apr 2012 10:51:37 +0200 Subject: [PATCH] minor modifs for Mac OS compilation --- Apps/Examples/clipping.h | 4 ++-- Apps/Examples/mcmesh.h | 4 ++-- Apps/Examples/viewer.h | 4 ++-- Apps/Examples/volumeExplorer.h | 2 +- Apps/Tuto/show_traversors.h | 2 +- Apps/Tuto/tuto5.h | 2 +- Apps/Tuto/tuto_mt.cpp | 2 +- Apps/Tuto/tuto_oper2.h | 2 +- Apps/Tuto/tuto_oper3.h | 2 +- Apps/Tuto/tuto_orbits.h | 2 +- include/Algo/Parallel/parallel_foreach.hpp | 10 +++++++--- include/Utils/{Qt => }/qtInputs.h | 0 include/Utils/{Qt => }/qtui.h | 0 include/Utils/textures.hpp | 4 ++-- src/Utils/{Qt => }/qtinputs.cpp | 3 ++- 15 files changed, 24 insertions(+), 19 deletions(-) rename include/Utils/{Qt => }/qtInputs.h (100%) rename include/Utils/{Qt => }/qtui.h (100%) rename src/Utils/{Qt => }/qtinputs.cpp (99%) diff --git a/Apps/Examples/clipping.h b/Apps/Examples/clipping.h index 8bd8406d..22758932 100644 --- a/Apps/Examples/clipping.h +++ b/Apps/Examples/clipping.h @@ -28,11 +28,11 @@ #include #include "Utils/Qt/qtSimple.h" -#include "Utils/Qt/qtInputs.h" +#include "Utils/qtInputs.h" #include "ui_clipping.h" // inclure qtui.h juste après le ui_xxx.h -#include "Utils/Qt/qtui.h" +#include "Utils/qtui.h" #include "Topology/generic/parameters.h" #include "Topology/map/embeddedMap3.h" diff --git a/Apps/Examples/mcmesh.h b/Apps/Examples/mcmesh.h index 16a39359..adf50479 100644 --- a/Apps/Examples/mcmesh.h +++ b/Apps/Examples/mcmesh.h @@ -17,7 +17,7 @@ * along with this library; if not, write to the Free Software Foundation, * * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * * -* Web site: https://iggservis.u-strasbg.fr/CGoGN/ * +* Web site: http://cgogn.unistra.fr * * Contact information: cgogn@unistra.fr * * * *******************************************************************************/ @@ -26,7 +26,7 @@ #include "Utils/Qt/qtSimple.h" #include "ui_mcmesh.h" -#include "Utils/Qt/qtui.h" +#include "Utils/qtui.h" #include "Topology/generic/parameters.h" #include "Topology/map/map2.h" diff --git a/Apps/Examples/viewer.h b/Apps/Examples/viewer.h index 0fe0c93f..b60cff20 100644 --- a/Apps/Examples/viewer.h +++ b/Apps/Examples/viewer.h @@ -17,7 +17,7 @@ * along with this library; if not, write to the Free Software Foundation, * * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * * -* Web site: http://cgogn.unistra.fr/ * +* Web site: http://cgogn.unistra.fr/ * * Contact information: cgogn@unistra.fr * * * *******************************************************************************/ @@ -26,7 +26,7 @@ #include "Utils/Qt/qtSimple.h" #include "ui_viewer.h" -#include "Utils/Qt/qtui.h" +#include "Utils/qtui.h" #include "Topology/generic/parameters.h" #include "Topology/map/embeddedMap2.h" diff --git a/Apps/Examples/volumeExplorer.h b/Apps/Examples/volumeExplorer.h index 952a818a..036b2972 100644 --- a/Apps/Examples/volumeExplorer.h +++ b/Apps/Examples/volumeExplorer.h @@ -46,7 +46,7 @@ #include "Utils/frameManipulator.h" #include "ui_volumeExplorer.h" -#include "Utils/Qt/qtui.h" +#include "Utils/qtui.h" using namespace CGoGN ; diff --git a/Apps/Tuto/show_traversors.h b/Apps/Tuto/show_traversors.h index 3ee65e1d..bedbbb78 100644 --- a/Apps/Tuto/show_traversors.h +++ b/Apps/Tuto/show_traversors.h @@ -56,7 +56,7 @@ #include "ui_show_traversors.h" // inclure qtui.h juste après le ui_xxx.h -#include "Utils/Qt/qtui.h" +#include "Utils/qtui.h" using namespace CGoGN ; diff --git a/Apps/Tuto/tuto5.h b/Apps/Tuto/tuto5.h index 31487002..02c65b86 100644 --- a/Apps/Tuto/tuto5.h +++ b/Apps/Tuto/tuto5.h @@ -57,7 +57,7 @@ #include "ui_tuto5.h" // inclure qtui.h juste après le ui_xxx.h -#include "Utils/Qt/qtui.h" +#include "Utils/qtui.h" using namespace CGoGN ; diff --git a/Apps/Tuto/tuto_mt.cpp b/Apps/Tuto/tuto_mt.cpp index f6e3a488..cb72f9ec 100644 --- a/Apps/Tuto/tuto_mt.cpp +++ b/Apps/Tuto/tuto_mt.cpp @@ -42,7 +42,7 @@ #include "Algo/Parallel/parallel_foreach.h" // for file input - #include "Utils/Qt/qtInputs.h" +#include "Utils/qtInputs.h" using namespace CGoGN ; diff --git a/Apps/Tuto/tuto_oper2.h b/Apps/Tuto/tuto_oper2.h index 50b0838a..8eba6643 100644 --- a/Apps/Tuto/tuto_oper2.h +++ b/Apps/Tuto/tuto_oper2.h @@ -40,7 +40,7 @@ #include "ui_tuto_oper2.h" -#include "Utils/Qt/qtui.h" +#include "Utils/qtui.h" #include "Utils/Qt/qtSimple.h" #include "Utils/cgognStream.h" diff --git a/Apps/Tuto/tuto_oper3.h b/Apps/Tuto/tuto_oper3.h index 5d491a5d..6d4440ff 100644 --- a/Apps/Tuto/tuto_oper3.h +++ b/Apps/Tuto/tuto_oper3.h @@ -40,7 +40,7 @@ #include "ui_tuto_oper3.h" -#include "Utils/Qt/qtui.h" +#include "Utils/qtui.h" #include "Utils/Qt/qtSimple.h" #include "Utils/cgognStream.h" diff --git a/Apps/Tuto/tuto_orbits.h b/Apps/Tuto/tuto_orbits.h index 87d9ac64..66c3ad0d 100644 --- a/Apps/Tuto/tuto_orbits.h +++ b/Apps/Tuto/tuto_orbits.h @@ -57,7 +57,7 @@ #include "ui_tuto_orbits.h" // inclure qtui.h juste après le ui_xxx.h -#include "Utils/Qt/qtui.h" +#include "Utils/qtui.h" using namespace CGoGN ; diff --git a/include/Algo/Parallel/parallel_foreach.hpp b/include/Algo/Parallel/parallel_foreach.hpp index d98a687b..b0933354 100644 --- a/include/Algo/Parallel/parallel_foreach.hpp +++ b/include/Algo/Parallel/parallel_foreach.hpp @@ -326,8 +326,8 @@ void foreach_cell(typename PFP::MAP& map, unsigned int cell, FunctorMapThreaded< template void foreach_dart(typename PFP::MAP& map, FunctorMapThreaded& func, unsigned int nbth, unsigned int szbuff, bool needMarkers, const FunctorSelect& good) { - std::vector vd[nbth]; - boost::thread* threads[nbth]; + std::vector* vd = new std::vector[nbth]; + boost::thread** threads = new boost::thread*[nbth]; Dart d=map.begin(); @@ -370,7 +370,7 @@ void foreach_dart(typename PFP::MAP& map, FunctorMapThreaded& threads[i] = new boost::thread(ThreadFunction(func, vd[i],sync1,sync2, finished,0)); } // and continue to traverse the map - std::vector tempo[nbth]; + std::vector* tempo = new std::vector[nbth]; for (unsigned int i=0; i& threads[i]->join(); delete threads[i]; } + + delete vd; + delete threads; + delete tempo; } diff --git a/include/Utils/Qt/qtInputs.h b/include/Utils/qtInputs.h similarity index 100% rename from include/Utils/Qt/qtInputs.h rename to include/Utils/qtInputs.h diff --git a/include/Utils/Qt/qtui.h b/include/Utils/qtui.h similarity index 100% rename from include/Utils/Qt/qtui.h rename to include/Utils/qtui.h diff --git a/include/Utils/textures.hpp b/include/Utils/textures.hpp index f028bd18..a4f18dd3 100644 --- a/include/Utils/textures.hpp +++ b/include/Utils/textures.hpp @@ -587,7 +587,7 @@ template void Image::subSample2() { Image* newImg = subSampleToNewImage2(); - swap(*newImg); + this->swap(*newImg); delete newImg; } @@ -720,7 +720,7 @@ template < unsigned int DIM, typename TYPE > void Image::rotate90(int axis) { Image* newImg = rotate90ToNewImage(axis); - swap(*newImg); + this->swap(*newImg); delete newImg; } diff --git a/src/Utils/Qt/qtinputs.cpp b/src/Utils/qtinputs.cpp similarity index 99% rename from src/Utils/Qt/qtinputs.cpp rename to src/Utils/qtinputs.cpp index 6b0b0fa6..db64cb87 100644 --- a/src/Utils/Qt/qtinputs.cpp +++ b/src/Utils/qtinputs.cpp @@ -21,7 +21,8 @@ * Contact information: cgogn@unistra.fr * * * *******************************************************************************/ -#include "Utils/Qt/qtInputs.h" + +#include "Utils/qtInputs.h" #include namespace CGoGN -- GitLab