diff --git a/CMakeLists.txt b/CMakeLists.txt index cd73979b70de853a2ec891b022afadcd11d604d4..33ba5a3e31126f67d06c8135a20c12e285b4dc64 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -506,7 +506,7 @@ if (UNIX OR APPLE) if (${GPU_MODE} MATCHES "CUDA") # Set CUDA Flags - set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS} -std=c++11") + set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS} -std=c++14") # Thrust library requires C++14 for CUDA >= 11 set(CUDA_NVCC_FLAGS_DEBUG "${CUDA_NVCC_FLAGS_DEBUG} -D_DEBUG -g") if (NOT CUDA_FOUND) diff --git a/doc/release_notes.md b/doc/release_notes.md index 358294392239eaf0ddd2bec8e21959302418e345..165ff577677117e4c70c5a75b70857ee987987c3 100644 --- a/doc/release_notes.md +++ b/doc/release_notes.md @@ -397,13 +397,13 @@ OpenPose Library - Release Notes 7. String is used in `include/openpose/wrapper/` to avoid std::string to cause errors for using diferent std DLLs. 8. Added `ScaleMode::ZeroToOneFixedAspect` and `ScaleMode::PlusMinusOneFixedAspect`. Compared to `ZeroToOne` and `PlusMinusOne`, the new ones also preserve the aspect ratio of each axis. 9. Added more verbose to wrapper when it is been configured, showing the values of some of its parameters. + 10. Removed many Visual Studio (Windows) warnings. 2. Functions or parameters renamed: 1. All headers moved into `openpose_private`, all 3rd-party library calls in headers, and std::string calls in `include/openpose/wrapper/`. 2. Renamed `dLog()` as `opLogIfDebug()`, `log()` as `opLog()`, `check()` as `checkBool()`, and also renamed all the `checkX()` functions in `include/openpose/utilities/check.hpp`. This avoids compiling crashes when exporting OpenPose to other projects which contain other 3rd-party libraries that define functions with the same popular names with `#define`. 3. Main bugs fixed: 1. Debug version of OpenPose actually targets debug lib/DLL files of 3rd-party libraries. 2. Debug version no longer prints on console a huge log message from Caffe with the network when starting OpenPose (fixed by using the right debug libraries). - 3. Removed many Visual Studio (Windows) warnings. 4. Natural sort now works properly with filenames containining numbers longer than the limit of an int. 5. Optionally auto-generated bin folder only contains the required DLLs (depending on the CMake configuration), instead of all of them. 6. When WrapperStructFace and WrapperStructHand are not called and configured for Wrapper, setting body to CPU rendering was not working. @@ -421,6 +421,7 @@ OpenPose Library - Release Notes 3. Added Asynchronous mode to Python API. 4. Added compatibility with Ubuntu 20.04, CUDA 11.X, and cuDNN 8.0.X. 5. Installation documentation highly simplified and improved. + 6. Removed all compiler warnings for Ubuntu 20.04. 2. Functions or parameters renamed: 3. Main bugs fixed: 1. 90 and 270-degree rotations working again. diff --git a/include/openpose/core/matrix.hpp b/include/openpose/core/matrix.hpp index bce5be90dcf4db26630601f6a1a95d5861b69aa6..67d77812fb00b479b66845f0a21856ce0a71aee1 100644 --- a/include/openpose/core/matrix.hpp +++ b/include/openpose/core/matrix.hpp @@ -32,7 +32,7 @@ namespace op // ... // Matrix opMat = CV2OPCONSTMAT(Matrix()); #define OP_CV2OPCONSTMAT(cvMat) \ - (op::Matrix((const void* const)&(cvMat))) + (op::Matrix((const void*)&(cvMat))) // Convert from std::vector into std::vector. Usage example: // #include diff --git a/src/openpose/core/array.cpp b/src/openpose/core/array.cpp index 6d2c2a0d7db98fab23a8cb3db54c0b7d274823c4..df6e57dddc6361d1eef4348d234c9ed555987fae 100644 --- a/src/openpose/core/array.cpp +++ b/src/openpose/core/array.cpp @@ -270,7 +270,7 @@ namespace op // Equivalent: std::copy(spData.get(), spData.get() + mVolume, array.spData.get()); std::copy(pData, pData + mVolume, array.pData); // Return - return std::move(array); + return array; } catch (const std::exception& e) { diff --git a/src/openpose/core/datum.cpp b/src/openpose/core/datum.cpp index 8fe5b03223f7bed80bd65779872ee0b2f9c5bf10..0840fe945a5e1d26e20bdc759072a34bfe0f9b63 100644 --- a/src/openpose/core/datum.cpp +++ b/src/openpose/core/datum.cpp @@ -361,7 +361,7 @@ namespace op #endif #endif // Return - return std::move(datum); + return datum; } catch (const std::exception& e) { diff --git a/src/openpose/core/matrix.cpp b/src/openpose/core/matrix.cpp index e7bf67a1352e33ce19d5d2d77d3c2b952fa3dfe5..3cc25e09ed9ef0369bd4f98c838c90e1a02c4a5c 100644 --- a/src/openpose/core/matrix.cpp +++ b/src/openpose/core/matrix.cpp @@ -111,7 +111,7 @@ namespace op { try { - return (const void* const)(&spImpl->mCvMat); + return (const void*)(&spImpl->mCvMat); } catch (const std::exception& e) { diff --git a/src/openpose/utilities/fileSystem.cpp b/src/openpose/utilities/fileSystem.cpp index 0de503f651b0a068719e5293ca1c5049143beed0..59de1065d5cacc619398ba6aed7417a2d218a1b4 100644 --- a/src/openpose/utilities/fileSystem.cpp +++ b/src/openpose/utilities/fileSystem.cpp @@ -48,7 +48,7 @@ namespace op if (aNumberAsString.size() != bNumberAsString.size()) return aNumberAsString.size() < bNumberAsString.size(); // Both same length --> Compare them - for (auto i = 0 ; i < aNumberAsString.size() ; ++i) + for (auto i = 0u ; i < aNumberAsString.size() ; ++i) if (aNumberAsString[i] != bNumberAsString[i]) return aNumberAsString[i] < bNumberAsString[i]; // Both same number --> Remove and return compareNat after removing those characters