From bdb2f1e72b749dd8645dc4c158122bc40d350960 Mon Sep 17 00:00:00 2001 From: jose_morato Date: Sun, 6 Oct 2024 08:21:05 +0200 Subject: [PATCH] set path on script --- .github/workflows/ci_standard.yaml | 2 +- .../csharp_cdr_generator.cpp | 14 +++++++++----- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci_standard.yaml b/.github/workflows/ci_standard.yaml index 0b821d55..83c0e84b 100644 --- a/.github/workflows/ci_standard.yaml +++ b/.github/workflows/ci_standard.yaml @@ -117,6 +117,7 @@ jobs: - name: Latency Performance Test shell: cmd run: | + set PATH="${{ github.workspace }}\ext\OpenDDS_${{ matrix.BuildPlatform }}\lib;${{ github.workspace }}\ext\OpenDDS_${{ matrix.BuildPlatform }}\ACE_wrappers\lib;%PATH%" dotnet clean ${{ github.workspace }}\Tests\TestIdlCdr\TestIdlCdr.csproj dotnet clean ${{ github.workspace }}\Tests\BenchmarkPerformance\BenchmarkPerformance.csproj dotnet restore ${{ github.workspace }}\Tests\TestIdlCdr\TestIdlCdr.csproj @@ -128,7 +129,6 @@ jobs: DDS_ROOT: "${{ github.workspace }}\\ext\\OpenDDS_${{ matrix.BuildPlatform }}" ACE_ROOT: "${{ github.workspace }}\\ext\\OpenDDS_${{ matrix.BuildPlatform }}\\ACE_wrappers" TAO_ROOT: "${{ github.workspace }}\\ext\\OpenDDS_${{ matrix.BuildPlatform }}\\ACE_wrappers\\TAO" - PATH: "${{ github.workspace }}\\ext\\OpenDDS_${{ matrix.BuildPlatform }}\\lib;${{ github.workspace }}\\ext\\OpenDDS_${{ matrix.BuildPlatform }}\\ACE_wrappers\\lib;%PATH%" build_linux: runs-on: ubuntu-20.04 diff --git a/Native/OpenDDSharp.IdlGenerator/csharp_cdr_generator.cpp b/Native/OpenDDSharp.IdlGenerator/csharp_cdr_generator.cpp index d243be63..2646722c 100644 --- a/Native/OpenDDSharp.IdlGenerator/csharp_cdr_generator.cpp +++ b/Native/OpenDDSharp.IdlGenerator/csharp_cdr_generator.cpp @@ -840,12 +840,10 @@ csharp_cdr_generator::implement_to_cdr_field(AST_Type *field_type, std::string f break; } case AST_Decl::NT_struct: { - ret.append(" var cdr = "); - ret.append(field_name); - ret.append(".ToCDR();\n"); - ret.append(indent); - ret.append(" writer.WriteBytes(cdr);\n"); + ret.append(" writer.WriteBytes("); + ret.append(field_name); + ret.append(".ToCDR());\n"); break; } case AST_Decl::NT_string: { @@ -1581,6 +1579,12 @@ csharp_cdr_generator::implement_from_cdr_field(AST_Type *field_type, std::string ret.append(")e)).ToList();\n"); break; } + case AST_Decl::NT_struct: { + ret.append(" "); + ret.append(field_name); + ret.append(" = reader.ReadStructSequence();\n"); + break; + } } break; }