From ef27cba6603168b928b1add862993d855c6d0c48 Mon Sep 17 00:00:00 2001 From: Remo E Date: Mon, 19 Aug 2024 17:54:23 +0200 Subject: [PATCH] fix: std::string casts --- .github/workflows/macos.yml | 8 +++++++- src/osgEarthImGui/LifeMapLayerGUI | 6 +++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 367d163b4b..95c371188d 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -46,7 +46,13 @@ jobs: shell: bash working-directory: ${{ runner.workspace }}/build run: | - cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DOSGEARTH_BUILD_TESTS=OFF -DOSGEARTH_BUILD_LEGACY_SPLAT_NODEKIT=ON -DOSGEARTH_BUILD_PROCEDURAL_NODEKIT=ON -DCMAKE_CXX_STANDARD:STRING=17 -DCMAKE_CXX_STANDARD_REQUIRED:BOOL=ON -GXcode -DVCPKG_MANIFEST_DIR=$GITHUB_WORKSPACE/vcpkg + cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE \ + -DCMAKE_CXX_STANDARD:STRING=17 \ + -DCMAKE_CXX_STANDARD_REQUIRED:BOOL=ON \ + -DOSGEARTH_BUILD_LEGACY_SPLAT_NODEKIT=ON \ + -DOSGEARTH_BUILD_PROCEDURAL_NODEKIT=ON \ + -DOSGEARTH_BUILD_TESTS=OFF \ + -GXcode -DVCPKG_MANIFEST_DIR=$GITHUB_WORKSPACE/vcpkg - name: 'Upload cmake configure log artifact' uses: actions/upload-artifact@v2 diff --git a/src/osgEarthImGui/LifeMapLayerGUI b/src/osgEarthImGui/LifeMapLayerGUI index e00a89a090..555510b878 100644 --- a/src/osgEarthImGui/LifeMapLayerGUI +++ b/src/osgEarthImGui/LifeMapLayerGUI @@ -185,7 +185,7 @@ namespace osgEarth { LandCoverSample sample = _landcoverUnderMouse.value(); if (sample.biomeid().isSet()) - ImGui::Text("biome_id = %s", sample.biomeid().get()); + ImGui::Text("biome_id = %s", sample.biomeid().get().c_str()); if (sample.dense().isSet()) ImGui::Text("dense = %.2f", sample.dense().get()); if (sample.lush().isSet()) @@ -193,9 +193,9 @@ namespace osgEarth if (sample.rugged().isSet()) ImGui::Text("rugged = %.2f", sample.rugged().get()); if (sample.material().isSet()) - ImGui::Text("material = %s", sample.material().get()); + ImGui::Text("material = %s", sample.material().get().c_str()); if (sample.soiltype().isSet()) - ImGui::Text("soiltype = %s", sample.soiltype().get()); + ImGui::Text("soiltype = %s", sample.soiltype().get().c_str()); } }