Skip to content

Commit 7d8e17d

Browse files
Merge pull request #701 from tony-p/fix/file-loggers-protected
fix: ensure public get config overload is used
2 parents 11e9d1a + 381f6e4 commit 7d8e17d

File tree

2 files changed

+11
-15
lines changed

2 files changed

+11
-15
lines changed

.github/workflows/pixi.yaml

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,27 +13,21 @@ jobs:
1313
matrix:
1414
include:
1515
- os: windows-latest
16-
shell: "pwsh -Login {0}"
17-
pixi_install: "iwr -useb https://pixi.sh/install.ps1 | iex"
1816
build_depend: vs2022_win-64=19.*
1917
tests_command: "'PATH=\\\"$PATH;build/Release\\\" build/tests/Release/behaviortree_cpp_test.exe'"
2018
- os: ubuntu-latest
21-
shell: "bash -el {0}"
22-
pixi_install: "curl -fsSL https://pixi.sh/install.sh | bash"
2319
build_depend: "gxx=12.2.*"
2420
tests_command: "./build/tests/behaviortree_cpp_test"
2521
runs-on: ${{ matrix.os }}
26-
defaults:
27-
run:
28-
shell: ${{ matrix.shell }}
2922
steps:
3023
# Pixi is the tool used to create/manage conda environment
31-
- name: Set up pixi
32-
run: |
33-
${{ matrix.pixi_install }}
34-
- name: Setup windows path
35-
if: "startsWith(runner.os, 'windows')"
36-
run: echo "C:\Users\runneradmin\AppData\Local\pixi\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
24+
- uses: prefix-dev/[email protected]
25+
with:
26+
pixi-version: v0.7.0
27+
locked: false
28+
frozen: false
29+
run-install: false
30+
manifest-path: build-env/pixi.yaml
3731
- name: Make pixi workspace
3832
run: |
3933
pixi init build-env

include/behaviortree_cpp/flatbuffers/bt_flatbuffer_helper.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,13 +80,15 @@ inline void CreateFlatbuffersBehaviorTree(flatbuffers::FlatBufferBuilder& builde
8080
children_uid.push_back(child->UID());
8181
}
8282

83+
// Const cast to ensure public access to config() overload
84+
const auto& node_config = const_cast<BT::TreeNode const &>(*node).config();
8385
std::vector<flatbuffers::Offset<Serialization::PortConfig>> ports;
84-
for (const auto& it : node->config().input_ports)
86+
for (const auto& it : node_config.input_ports)
8587
{
8688
ports.push_back(Serialization::CreatePortConfigDirect(builder, it.first.c_str(),
8789
it.second.c_str()));
8890
}
89-
for (const auto& it : node->config().output_ports)
91+
for (const auto& it : node_config.output_ports)
9092
{
9193
ports.push_back(Serialization::CreatePortConfigDirect(builder, it.first.c_str(),
9294
it.second.c_str()));

0 commit comments

Comments
 (0)