From 8f33bad363bed4579e073d2554b0f5884f81f25e Mon Sep 17 00:00:00 2001 From: f4exb Date: Thu, 28 Mar 2024 22:12:27 +0100 Subject: [PATCH] Fix MXVC boost multiprecision issue --- ft8/packing.cpp | 9 +++++++++ ft8/packing.h | 1 + sdrbench/test_ft8protocols.cpp | 9 +-------- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/ft8/packing.cpp b/ft8/packing.cpp index dfa8c427b..aa5eac1aa 100644 --- a/ft8/packing.cpp +++ b/ft8/packing.cpp @@ -934,4 +934,13 @@ bool Packing::packfree(int a77[], const std::string& msg) return true; } +void Packing::pack1(int a77[], int c28_1, int c28_2, int g15, int report) +{ + pa64(a77, 0, 28, c28_1); + pa64(a77, 28+1, 28, c28_2); + a77[28+1+28+1] = report; + pa64(a77, 28+1+28+2, 15, g15); + pa64(a77, 28+1+28+2+15, 3, 1); +} + } // namespace FT8 diff --git a/ft8/packing.h b/ft8/packing.h index 0659d1949..c3caa9775 100644 --- a/ft8/packing.h +++ b/ft8/packing.h @@ -40,6 +40,7 @@ public: static bool packcall_std(int& c28, const std::string& callstr); static bool packgrid(int& g15, const std::string& locstr); static bool packfree(int a77[], const std::string& msg); + static void pack1(int a77[], int c28_1, int c28_2, int g15, int report); private: static int ihashcall(std::string call, int m); diff --git a/sdrbench/test_ft8protocols.cpp b/sdrbench/test_ft8protocols.cpp index 654336a19..075338d98 100644 --- a/sdrbench/test_ft8protocols.cpp +++ b/sdrbench/test_ft8protocols.cpp @@ -34,7 +34,6 @@ void MainBench::testFT8(const QString& wavFile, const QString& argsStr) #include "ft8/ft8.h" #include "ft8/packing.h" -#include "ft8/pack0.h" class TestFT8Protocols { @@ -122,13 +121,7 @@ void TestFT8Protocols::testMsg1(const QStringList& argElements, bool runLDPC) int a77[77]; std::fill(a77, a77 + 77, 0); - - FT8::pa64(a77, 0, 28, c28_1); - FT8::pa64(a77, 28+1, 28, c28_2); - a77[28+1+28+1] = report; - FT8::pa64(a77, 28+1+28+2, 15, g15); - FT8::pa64(a77, 28+1+28+2+15, 3, 1); - + FT8::Packing::pack1(a77, c28_1, c28_2, g15, report); FT8::Packing packing; std::string call1, call2, loc;