From 5c86f5e27ec116b06e2f4d8bb6f54d0ddedb0ddc Mon Sep 17 00:00:00 2001 From: max-ruggi Date: Wed, 17 Sep 2025 14:09:31 +0000 Subject: [PATCH] working build + gitignore --- .gitignore | 9 +++++++++ lib/include/srsran/asn1/asn1_utils.h | 10 ++++++---- srsue/src/phy/phy_common.cc | 1 + 3 files changed, 16 insertions(+), 4 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000000..0b752aac561 --- /dev/null +++ b/.gitignore @@ -0,0 +1,9 @@ +.DS_Store +*.deb +*.log +*.patch +build*/ +bld*/ +Testing/ +.cache/ +schema_parameters.yaml \ No newline at end of file diff --git a/lib/include/srsran/asn1/asn1_utils.h b/lib/include/srsran/asn1/asn1_utils.h index 9422b9390c1..f974bf085e2 100644 --- a/lib/include/srsran/asn1/asn1_utils.h +++ b/lib/include/srsran/asn1/asn1_utils.h @@ -225,8 +225,8 @@ class dyn_array if (this == &other) { return *this; } - resize(other.size()); - std::copy(&other[0], &other[size_], data_); + resize(other.size()); + std::copy(&other[0], &other[0] + other.size(), data_); return *this; } void resize(uint32_t new_size, uint32_t new_cap = 0) @@ -243,9 +243,11 @@ class dyn_array cap_ = new_size > new_cap ? new_size : new_cap; if (cap_ > 0) { data_ = new T[cap_]; - if (old_data != NULL) { + if (old_data != NULL && size_ > 0) { srsran_assert(cap_ > size_, "Old size larger than new capacity in dyn_array\n"); - std::copy(&old_data[0], &old_data[size_], data_); + for (uint32_t i = 0; i < size_; ++i) { + data_[i] = old_data[i]; + } } } else { data_ = NULL; diff --git a/srsue/src/phy/phy_common.cc b/srsue/src/phy/phy_common.cc index 88f290732ed..a84b5104b44 100644 --- a/srsue/src/phy/phy_common.cc +++ b/srsue/src/phy/phy_common.cc @@ -655,6 +655,7 @@ void phy_common::reset_measurements(uint32_t cc_idx) for (uint32_t cc = 0; cc < SRSRAN_MAX_CARRIERS; cc++) { reset_measurements(cc); } + return; } // Default all metrics to NAN to prevent providing invalid information on traces and other layers