Skip to content

Commit

Permalink
more attempt to shut up sonar cloud where it actually needs to
Browse files Browse the repository at this point in the history
Signed-off-by: Martijn Govers <[email protected]>
  • Loading branch information
mgovers committed Sep 26, 2024
1 parent 1890520 commit 8144221
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 31 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ class Buffer {
void set_nan(Idx buffer_offset) { set_nan(*this, buffer_offset, 1); }
void set_nan(Idx buffer_offset, Idx size) { set_nan(*this, buffer_offset, size); }

static void set_value(MetaAttribute const* attribute, Buffer& buffer, RawDataConstPtr src_ptr, Idx buffer_offset,
Idx size, Idx src_stride) { // NOSONAR: no reference-to-const
static void set_value(MetaAttribute const* attribute, Buffer& buffer, // NOSONAR: no reference-to-const
RawDataConstPtr src_ptr, Idx buffer_offset, Idx size, Idx src_stride) {
buffer.handle_.call_with(PGM_buffer_set_value, attribute, buffer.buffer_.get(), src_ptr, buffer_offset, size,
src_stride);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,35 +80,34 @@ class DatasetWritable {
static DatasetInfo const& get_info(DatasetWritable const& dataset) { return dataset.info_; }
DatasetInfo const& get_info() const { return get_info(*this); }

static void set_buffer(DatasetWritable& dataset, std::string const& component, Idx* indptr,
RawDataPtr data) { // NOSONAR: no reference-to-const
static void set_buffer(DatasetWritable& dataset, // NOSONAR: no reference-to-const
std::string const& component, Idx* indptr, RawDataPtr data) {
dataset.handle_.call_with(PGM_dataset_writable_set_buffer, dataset.dataset_, component.c_str(), indptr, data);
}
void set_buffer(std::string const& component, Idx* indptr, RawDataPtr data) {
set_buffer(*this, component, indptr, data);
}

static void set_buffer(DatasetWritable& dataset, std::string const& component, Idx* indptr,
Buffer const& data) { // NOSONAR: no reference-to-const
static void set_buffer(DatasetWritable& dataset, // NOSONAR: no reference-to-const
std::string const& component, Idx* indptr, Buffer const& data) {
dataset.handle_.call_with(PGM_dataset_writable_set_buffer, dataset.dataset_, component.c_str(), indptr,
data.get());
}
void set_buffer(std::string const& component, Idx* indptr, Buffer const& data) {
set_buffer(*this, component, indptr, data);
}

static void set_attribute_buffer(DatasetWritable& dataset, std::string const& component,
std::string const& attribute, RawDataPtr data) { // NOSONAR: no reference-to-const
static void set_attribute_buffer(DatasetWritable& dataset, // NOSONAR: no reference-to-const
std::string const& component, std::string const& attribute, RawDataPtr data) {
dataset.handle_.call_with(PGM_dataset_writable_set_attribute_buffer, dataset.dataset_, component.c_str(),
attribute.c_str(), data);
}
void set_attribute_buffer(std::string const& component, std::string const& attribute, RawDataPtr data) {
set_attribute_buffer(*this, component, attribute, data);
}

static void set_attribute_buffer(DatasetWritable& dataset, std::string const& component,
std::string const& attribute,
Buffer const& data) { // NOSONAR: no reference-to-const
static void set_attribute_buffer(DatasetWritable& dataset, // NOSONAR: no reference-to-const
std::string const& component, std::string const& attribute, Buffer const& data) {
dataset.handle_.call_with(PGM_dataset_writable_set_attribute_buffer, dataset.dataset_, component.c_str(),
attribute.c_str(), data.get());
}
Expand All @@ -130,8 +129,9 @@ class DatasetMutable {

RawMutableDataset* get() const { return dataset_.get(); }

static void add_buffer(DatasetMutable& dataset, std::string const& component, Idx elements_per_scenario,
Idx total_elements, Idx const* indptr, RawDataPtr data) { // NOSONAR: no reference-to-const
static void add_buffer(DatasetMutable& dataset, // NOSONAR: no reference-to-const
std::string const& component, Idx elements_per_scenario, Idx total_elements,
Idx const* indptr, RawDataPtr data) {
dataset.handle_.call_with(PGM_dataset_mutable_add_buffer, dataset.dataset_.get(), component.c_str(),
elements_per_scenario, total_elements, indptr, data);
}
Expand All @@ -140,9 +140,9 @@ class DatasetMutable {
add_buffer(*this, component, elements_per_scenario, total_elements, indptr, data);
}

static void add_buffer(DatasetMutable& dataset, std::string const& component, Idx elements_per_scenario,
Idx total_elements, Idx const* indptr,
Buffer const& data) { // NOSONAR: no reference-to-const
static void add_buffer(DatasetMutable& dataset, // NOSONAR: no reference-to-const
std::string const& component, Idx elements_per_scenario, Idx total_elements,
Idx const* indptr, Buffer const& data) {
dataset.handle_.call_with(PGM_dataset_mutable_add_buffer, dataset.dataset_.get(), component.c_str(),
elements_per_scenario, total_elements, indptr, data.get());
}
Expand All @@ -151,18 +151,17 @@ class DatasetMutable {
add_buffer(*this, component, elements_per_scenario, total_elements, indptr, data);
}

static void add_attribute_buffer(DatasetMutable& dataset, std::string const& component,
std::string const& attribute, RawDataPtr data) { // NOSONAR: no reference-to-const
static void add_attribute_buffer(DatasetMutable& dataset, // NOSONAR: no reference-to-const
std::string const& component, std::string const& attribute, RawDataPtr data) {
dataset.handle_.call_with(PGM_dataset_mutable_add_attribute_buffer, dataset.dataset_.get(), component.c_str(),
attribute.c_str(), data);
}
void add_attribute_buffer(std::string const& component, std::string const& attribute, RawDataPtr data) {
add_attribute_buffer(*this, component, attribute, data);
}

static void add_attribute_buffer(DatasetMutable& dataset, std::string const& component,
std::string const& attribute,
Buffer const& data) { // NOSONAR: no reference-to-const
static void add_attribute_buffer(DatasetMutable& dataset, // NOSONAR: no reference-to-const
std::string const& component, std::string const& attribute, Buffer const& data) {
dataset.handle_.call_with(PGM_dataset_mutable_add_attribute_buffer, dataset.dataset_.get(), component.c_str(),
attribute.c_str(), data.get());
}
Expand Down Expand Up @@ -193,9 +192,9 @@ class DatasetConst {

RawConstDataset* get() const { return dataset_.get(); }

static void add_buffer(DatasetConst& dataset, std::string const& component, Idx elements_per_scenario,
Idx total_elements, Idx const* indptr,
RawDataConstPtr data) { // NOSONAR: no reference-to-const
static void add_buffer(DatasetConst& dataset, // NOSONAR: no reference-to-const
std::string const& component, Idx elements_per_scenario, Idx total_elements,
Idx const* indptr, RawDataConstPtr data) {
dataset.handle_.call_with(PGM_dataset_const_add_buffer, dataset.dataset_.get(), component.c_str(),
elements_per_scenario, total_elements, indptr, data);
}
Expand All @@ -204,9 +203,9 @@ class DatasetConst {
add_buffer(*this, component, elements_per_scenario, total_elements, indptr, data);
}

static void add_buffer(DatasetConst& dataset, std::string const& component, Idx elements_per_scenario,
Idx total_elements, Idx const* indptr,
Buffer const& data) { // NOSONAR: no reference-to-const
static void add_buffer(DatasetConst& dataset, // NOSONAR: no reference-to-const
std::string const& component, Idx elements_per_scenario, Idx total_elements,
Idx const* indptr, Buffer const& data) {
dataset.handle_.call_with(PGM_dataset_const_add_buffer, dataset.dataset_.get(), component.c_str(),
elements_per_scenario, total_elements, indptr, data.get());
}
Expand All @@ -215,17 +214,17 @@ class DatasetConst {
add_buffer(*this, component, elements_per_scenario, total_elements, indptr, data);
}

static void add_attribute_buffer(DatasetConst& dataset, std::string const& component, std::string const& attribute,
RawDataConstPtr data) { // NOSONAR: no reference-to-const
static void add_attribute_buffer(DatasetConst& dataset, // NOSONAR: no reference-to-const
std::string const& component, std::string const& attribute, RawDataConstPtr data) {
dataset.handle_.call_with(PGM_dataset_const_add_attribute_buffer, dataset.dataset_.get(), component.c_str(),
attribute.c_str(), data);
}
void add_attribute_buffer(std::string const& component, std::string const& attribute, RawDataConstPtr data) {
add_attribute_buffer(*this, component, attribute, data);
}

static void add_attribute_buffer(DatasetConst& dataset, std::string const& component, std::string const& attribute,
Buffer const& data) { // NOSONAR: no reference-to-const
static void add_attribute_buffer(DatasetConst& dataset, // NOSONAR: no reference-to-const
std::string const& component, std::string const& attribute, Buffer const& data) {
dataset.handle_.call_with(PGM_dataset_const_add_attribute_buffer, dataset.dataset_.get(), component.c_str(),
attribute.c_str(), data.get());
}
Expand Down

0 comments on commit 8144221

Please sign in to comment.