Skip to content

Commit

Permalink
[octomap] fix c++20 compilation error (microsoft#33851)
Browse files Browse the repository at this point in the history
* fix c++20 compilation error

* update version

---------

Co-authored-by: Zhao Liu <[email protected]>
  • Loading branch information
JonLiu1993 and Zhao Liu authored Sep 19, 2023
1 parent 7c06f2b commit 4cfabe7
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 3 deletions.
22 changes: 22 additions & 0 deletions ports/octomap/fix-compilation.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
diff --git a/octomap/include/octomap/ScanGraph.h b/octomap/include/octomap/ScanGraph.h
index 07c7436..e54eaf5 100644
--- a/octomap/include/octomap/ScanGraph.h
+++ b/octomap/include/octomap/ScanGraph.h
@@ -60,7 +60,7 @@ namespace octomap {

~ScanNode();

- bool operator == (const ScanNode& other) {
+ bool operator == (const ScanNode& other) const {
return (id == other.id);
}

@@ -87,7 +87,7 @@ namespace octomap {
: first(_first), second(_second), constraint(_constraint), weight(1.0) { }
ScanEdge() {}

- bool operator == (const ScanEdge& other) {
+ bool operator == (const ScanEdge& other) const {
return ( (*first == *(other.first) ) && ( *second == *(other.second) ) );
}

5 changes: 3 additions & 2 deletions ports/octomap/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ vcpkg_from_github(
SHA512 ec321a5355091acbd3d3fda7c858e2078c29195e73461c8a34db2c4614c6b2e38b35a59671f1071f7eb397cac4df78869f14a13af2e68d64e5a2e2d8727846cd
HEAD_REF master
PATCHES
"001-fix-exported-targets.patch"
001-fix-exported-targets.patch
fix-compilation.patch
)

vcpkg_cmake_configure(
Expand Down Expand Up @@ -38,7 +39,7 @@ endif()
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/octomap")

# Handle copyright
file(INSTALL "${SOURCE_PATH}/octomap/LICENSE.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/octomap/LICENSE.txt")

vcpkg_copy_pdbs()

Expand Down
1 change: 1 addition & 0 deletions ports/octomap/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "octomap",
"version": "1.9.6",
"port-version": 1,
"description": "An Efficient Probabilistic 3D Mapping Framework Based on Octrees",
"homepage": "https://octomap.github.io/",
"license": "BSD-3-Clause",
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -5922,7 +5922,7 @@
},
"octomap": {
"baseline": "1.9.6",
"port-version": 0
"port-version": 1
},
"ode": {
"baseline": "0.16.3",
Expand Down
5 changes: 5 additions & 0 deletions versions/o-/octomap.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "b778b0aef20fee697a18865995fff021501e8509",
"version": "1.9.6",
"port-version": 1
},
{
"git-tree": "b6146ecee8dcf9ba6573d11f26c1574e89c546d8",
"version": "1.9.6",
Expand Down

0 comments on commit 4cfabe7

Please sign in to comment.