Skip to content

Commit

Permalink
followed pre-commit suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
evgueni-ovtchinnikov committed Dec 12, 2024
1 parent ac31b6a commit c3b25d6
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
11 changes: 6 additions & 5 deletions src/buildblock/ProjDataInMemory.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,12 @@ ProjDataInMemory::ProjDataInMemory(shared_ptr<const ExamInfo> const& exam_info_s
void
ProjDataInMemory::create_buffer(const bool initialise_with_0)
{
if (!initialise_with_0) {
this->buffer.set_initialise_with_zeros(false);
this->buffer.grow(0, this->size_all() - 1);
return;
}
if (!initialise_with_0)
{
this->buffer.set_initialise_with_zeros(false);
this->buffer.grow(0, this->size_all() - 1);
return;
}
#if 0
float *b = new float[this->size_all()];
if (initialise_with_0)
Expand Down
2 changes: 1 addition & 1 deletion src/include/stir/Array.h
Original file line number Diff line number Diff line change
Expand Up @@ -589,7 +589,7 @@ class Array<1, elemT> : public NumericVectorWithOffset<elemT, elemT>
*/
inline void init(const IndexRange<1>& range, elemT* const data_ptr, bool copy_data);

bool init_with_zeros_= 1;
bool init_with_zeros_ = 1;
};

END_NAMESPACE_STIR
Expand Down
9 changes: 5 additions & 4 deletions src/include/stir/Array.inl
Original file line number Diff line number Diff line change
Expand Up @@ -584,10 +584,11 @@ Array<1, elemT>::resize(const int min_index, const int max_index)

base_type::resize(min_index, max_index);

if (!get_initialise_with_zeros()) {
this->check_state();
return;
}
if (!get_initialise_with_zeros())
{
this->check_state();
return;
}

if (oldlength == 0)
{
Expand Down

0 comments on commit c3b25d6

Please sign in to comment.