Skip to content

Commit

Permalink
- v3.21.2
Browse files Browse the repository at this point in the history
- Fix pb with Viewer on windows
- Fix compilation errors with visual 2022
  • Loading branch information
fredboudon committed Apr 11, 2024
1 parent 716fa0e commit c499879
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 6 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ endif()
find_package (Python3 COMPONENTS Interpreter Development NumPy REQUIRED)
include_directories(${Python3_INCLUDE_DIRS})
message(STATUS "Python version : " ${Python3_VERSION})
message(STATUS "Python executable : " ${Python3_EXECUTABLE})
message(STATUS "Python lib : " ${Python3_LIBRARIES})

# --- Libraries
Expand Down
9 changes: 6 additions & 3 deletions src/cpp/plantgl/algo/codec/vrmlprinter.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ typedef RCPtr<Appearance> AppearancePtr;

/// struct for testing equality of 2 pairs

#ifndef WIN32_STL_EXTENSION
#ifdef USING_UNORDERED_MAP

template <class type>
struct eqpair
Expand All @@ -94,7 +94,9 @@ struct hashpair
/// hash set of pairs
typedef pgl_hash_set<std::pair< uint_t, uint_t>,hashpair<uint_t>,eqpair<uint_t> > SCache;


#else
#ifdef WIN32_STL_EXTENSION

template <class type>
struct less_pair
Expand All @@ -107,7 +109,7 @@ struct less_pair


template <class type>
struct hash_comp_pair : STDEXT::hash_compare<std::pair<type,type>,less_pair<type> >
struct hash_comp_pair : pgl_hash<std::pair<type,type>,less_pair<type> >
{

size_t operator()(const std::pair<type,type>& a) const
Expand All @@ -120,12 +122,13 @@ struct hash_comp_pair : STDEXT::hash_compare<std::pair<type,type>,less_pair<type
return ((a.first < b.first)||(a.second < b.second));
}

STDEXT::hash_compare<type> H;
pgl_hash<type> H;
};

typedef pgl_hash_set<std::pair< uint_t, uint_t>, hash_comp_pair<uint_t> > SCache;

#endif
#endif


/**
Expand Down
2 changes: 1 addition & 1 deletion src/cpp/plantgl/gui/base/application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ static bool DestroyedAppli = false;
void initViewerAppli(){
if(VIEWER_APPLI == NULL){
#ifdef QT_THREAD_SUPPORT
if(qApp == NULL && MODE){
if((qApp == NULL && QApplication::instance() == NULL) && MODE){
if(!DestroyedAppli)
VIEWER_APPLI = new ViewerThreadedAppli();
else
Expand Down
2 changes: 1 addition & 1 deletion src/cpp/plantgl/tool/util_hashmap.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
#endif
#endif


#include <string>

template <class T>
struct pgl_hash_map_string : public pgl_hash_map<std::string, T >{};
Expand Down
1 change: 1 addition & 0 deletions src/cpp/plantgl/tool/util_hashset.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
#endif
#endif

#include <string>

typedef pgl_hash_set<std::string> pgl_hash_set_string ;
typedef pgl_hash_set<uint_t> pgl_hash_set_uint32;
Expand Down
2 changes: 1 addition & 1 deletion src/cpp/plantgl/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
#define __plantgl_version_h__

/// PGL Version macro
#define PGL_VERSION 0x031501
#define PGL_VERSION 0x031502

#endif

Expand Down

0 comments on commit c499879

Please sign in to comment.