Skip to content

Commit

Permalink
Ubuntu20: Removed compiler warnings
Browse files Browse the repository at this point in the history
Signed-off-by: Gines Hidalgo <[email protected]>
  • Loading branch information
gineshidalgo99 committed Nov 10, 2020
1 parent 8a9b46c commit 1198458
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 2 additions & 1 deletion doc/release_notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion include/openpose/core/matrix.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<Matrix> into std::vector<cv::Mat>. Usage example:
// #include <opencv2/core/core.hpp>
Expand Down
2 changes: 1 addition & 1 deletion src/openpose/core/array.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
2 changes: 1 addition & 1 deletion src/openpose/core/datum.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ namespace op
#endif
#endif
// Return
return std::move(datum);
return datum;
}
catch (const std::exception& e)
{
Expand Down
2 changes: 1 addition & 1 deletion src/openpose/core/matrix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ namespace op
{
try
{
return (const void* const)(&spImpl->mCvMat);
return (const void*)(&spImpl->mCvMat);
}
catch (const std::exception& e)
{
Expand Down
2 changes: 1 addition & 1 deletion src/openpose/utilities/fileSystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1198458

Please sign in to comment.