Skip to content
This repository was archived by the owner on Feb 26, 2025. It is now read-only.

Commit

Permalink
code review feedback, some cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
mgeplf committed Mar 16, 2022
1 parent f0785ab commit c65fdff
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions include/morphio/morphology.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class Morphology
/** Constructor from an already parsed file */
explicit Morphology(const HighFive::Group& group, unsigned int options = NO_MODIFIER);
/** Constructor from an instance of morphio::mut::Morphology */
explicit Morphology(mut::Morphology);
explicit Morphology(const mut::Morphology&);

/** Return the soma object */
Soma soma() const;
Expand All @@ -52,7 +52,7 @@ class Morphology
Mitochondria mitochondria() const;

/** Return the endoplasmic reticulum object */
const EndoplasmicReticulum endoplasmicReticulum() const;
EndoplasmicReticulum endoplasmicReticulum() const;

/** Return the annotation object */
const std::vector<Property::Annotation>& annotations() const;
Expand Down
2 changes: 1 addition & 1 deletion include/morphio/section_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ T SectionBase<T>::parent() const {

template <typename T>
std::vector<T> SectionBase<T>::children() const {
const auto section_children = properties_->children<typename T::SectionId>();
const auto& section_children = properties_->children<typename T::SectionId>();

if (section_children.empty()) {
return {};
Expand Down
6 changes: 3 additions & 3 deletions src/morphology.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ Morphology::Morphology(const HighFive::Group& group, unsigned int options)
Morphology::Morphology(const std::string& source, unsigned int options)
: Morphology(loadURI(source, options), options) {}

Morphology::Morphology(mut::Morphology morphology) {
Morphology::Morphology(const mut::Morphology& morphology) {
properties_ = std::make_shared<Property::Properties>(morphology.buildReadOnly());
buildChildren(properties_);
}
Expand All @@ -119,7 +119,7 @@ Mitochondria Morphology::mitochondria() const {
return Mitochondria(properties_);
}

const EndoplasmicReticulum Morphology::endoplasmicReticulum() const {
EndoplasmicReticulum Morphology::endoplasmicReticulum() const {
return EndoplasmicReticulum(properties_);
}

Expand All @@ -136,7 +136,7 @@ Section Morphology::section(uint32_t id) const {
}

std::vector<Section> Morphology::rootSections() const {
const auto sections = properties_->children<morphio::Property::Section>();
const auto& sections = properties_->children<morphio::Property::Section>();

if (sections.empty()) {
return {};
Expand Down

0 comments on commit c65fdff

Please sign in to comment.