From: Martin Kronbichler Date: Thu, 1 Oct 2020 15:28:45 +0000 (+0200) Subject: Add inline keyword X-Git-Tag: v9.3.0-rc1~1050^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F10987%2Fhead;p=dealii.git Add inline keyword --- diff --git a/include/deal.II/particles/particle.h b/include/deal.II/particles/particle.h index 61e1b1724d..0cf7d050ef 100644 --- a/include/deal.II/particles/particle.h +++ b/include/deal.II/particles/particle.h @@ -457,7 +457,7 @@ namespace Particles template template - void + inline void Particle::load(Archive &ar, const unsigned int) { unsigned int n_properties = 0; @@ -475,7 +475,7 @@ namespace Particles template template - void + inline void Particle::save(Archive &ar, const unsigned int) const { unsigned int n_properties = 0; @@ -492,7 +492,7 @@ namespace Particles template - void + inline void Particle::set_location(const Point &new_loc) { location = new_loc; @@ -501,7 +501,7 @@ namespace Particles template - const Point & + inline const Point & Particle::get_location() const { return location; @@ -510,7 +510,7 @@ namespace Particles template - void + inline void Particle::set_reference_location(const Point &new_loc) { reference_location = new_loc; @@ -519,7 +519,7 @@ namespace Particles template - const Point & + inline const Point & Particle::get_reference_location() const { return reference_location; @@ -528,7 +528,7 @@ namespace Particles template - types::particle_index + inline types::particle_index Particle::get_id() const { return id; @@ -537,7 +537,7 @@ namespace Particles template - void + inline void Particle::set_id(const types::particle_index &new_id) { id = new_id; @@ -546,7 +546,7 @@ namespace Particles template - void + inline void Particle::set_property_pool(PropertyPool &new_property_pool) { property_pool = &new_property_pool; @@ -555,7 +555,7 @@ namespace Particles template - const ArrayView + inline const ArrayView Particle::get_properties() const { Assert(has_properties(), ExcInternalError()); @@ -566,7 +566,7 @@ namespace Particles template - bool + inline bool Particle::has_properties() const { return (property_pool != nullptr) && diff --git a/include/deal.II/particles/particle_accessor.h b/include/deal.II/particles/particle_accessor.h index 08bddc4586..2265d10af0 100644 --- a/include/deal.II/particles/particle_accessor.h +++ b/include/deal.II/particles/particle_accessor.h @@ -293,8 +293,9 @@ namespace Particles // ------------------------- inline functions ------------------------------ + template - ParticleAccessor::ParticleAccessor() + inline ParticleAccessor::ParticleAccessor() : map(nullptr) , particle() {} @@ -302,7 +303,7 @@ namespace Particles template - ParticleAccessor::ParticleAccessor( + inline ParticleAccessor::ParticleAccessor( const std::multimap> &map, const typename std::multimap>::iterator & particle) @@ -314,7 +315,7 @@ namespace Particles template - void + inline void ParticleAccessor::write_data(void *&data) const { Assert(particle != map->end(), ExcInternalError()); @@ -325,7 +326,7 @@ namespace Particles template - void + inline void ParticleAccessor::set_location(const Point &new_loc) { Assert(particle != map->end(), ExcInternalError()); @@ -336,7 +337,7 @@ namespace Particles template - const Point & + inline const Point & ParticleAccessor::get_location() const { Assert(particle != map->end(), ExcInternalError()); @@ -347,7 +348,7 @@ namespace Particles template - void + inline void ParticleAccessor::set_reference_location( const Point &new_loc) { @@ -359,7 +360,7 @@ namespace Particles template - const Point & + inline const Point & ParticleAccessor::get_reference_location() const { Assert(particle != map->end(), ExcInternalError()); @@ -370,7 +371,7 @@ namespace Particles template - types::particle_index + inline types::particle_index ParticleAccessor::get_id() const { Assert(particle != map->end(), ExcInternalError()); @@ -381,7 +382,7 @@ namespace Particles template - void + inline void ParticleAccessor::set_property_pool( PropertyPool &new_property_pool) { @@ -393,7 +394,7 @@ namespace Particles template - bool + inline bool ParticleAccessor::has_properties() const { Assert(particle != map->end(), ExcInternalError()); @@ -404,7 +405,7 @@ namespace Particles template - void + inline void ParticleAccessor::set_properties( const std::vector &new_properties) { @@ -416,7 +417,7 @@ namespace Particles template - void + inline void ParticleAccessor::set_properties( const ArrayView &new_properties) { @@ -428,7 +429,7 @@ namespace Particles template - const ArrayView + inline const ArrayView ParticleAccessor::get_properties() const { Assert(particle != map->end(), ExcInternalError()); @@ -439,7 +440,7 @@ namespace Particles template - typename Triangulation::cell_iterator + inline typename Triangulation::cell_iterator ParticleAccessor::get_surrounding_cell( const Triangulation &triangulation) const { @@ -453,7 +454,7 @@ namespace Particles template - const ArrayView + inline const ArrayView ParticleAccessor::get_properties() { Assert(particle != map->end(), ExcInternalError()); @@ -464,7 +465,7 @@ namespace Particles template - std::size_t + inline std::size_t ParticleAccessor::serialized_size_in_bytes() const { Assert(particle != map->end(), ExcInternalError()); @@ -475,7 +476,7 @@ namespace Particles template - void + inline void ParticleAccessor::next() { Assert(particle != map->end(), ExcInternalError()); @@ -485,7 +486,7 @@ namespace Particles template - void + inline void ParticleAccessor::prev() { Assert(particle != map->begin(), ExcInternalError()); @@ -495,7 +496,7 @@ namespace Particles template - bool + inline bool ParticleAccessor:: operator!=(const ParticleAccessor &other) const { @@ -505,7 +506,7 @@ namespace Particles template - bool + inline bool ParticleAccessor:: operator==(const ParticleAccessor &other) const { diff --git a/include/deal.II/particles/particle_iterator.h b/include/deal.II/particles/particle_iterator.h index 1bb56a2bae..8d2f4f623a 100644 --- a/include/deal.II/particles/particle_iterator.h +++ b/include/deal.II/particles/particle_iterator.h @@ -145,7 +145,7 @@ namespace Particles // ------------------------------ inline functions ------------------------- template - ParticleIterator::ParticleIterator( + inline ParticleIterator::ParticleIterator( const std::multimap> &map, const typename std::multimap>::iterator & particle) @@ -155,7 +155,8 @@ namespace Particles template - ParticleAccessor &ParticleIterator::operator*() + inline ParticleAccessor &ParticleIterator:: + operator*() { return accessor; } @@ -163,7 +164,8 @@ namespace Particles template - ParticleAccessor *ParticleIterator::operator->() + inline ParticleAccessor *ParticleIterator:: + operator->() { return &(this->operator*()); } @@ -171,8 +173,8 @@ namespace Particles template - const ParticleAccessor &ParticleIterator:: - operator*() const + inline const ParticleAccessor & + ParticleIterator::operator*() const { return accessor; } @@ -180,8 +182,8 @@ namespace Particles template - const ParticleAccessor *ParticleIterator:: - operator->() const + inline const ParticleAccessor * + ParticleIterator::operator->() const { return &(this->operator*()); } @@ -189,7 +191,7 @@ namespace Particles template - bool + inline bool ParticleIterator:: operator!=(const ParticleIterator &other) const { @@ -199,7 +201,7 @@ namespace Particles template - bool + inline bool ParticleIterator:: operator==(const ParticleIterator &other) const { @@ -209,7 +211,7 @@ namespace Particles template - ParticleIterator & + inline ParticleIterator & ParticleIterator::operator++() { accessor.next(); @@ -219,7 +221,7 @@ namespace Particles template - ParticleIterator + inline ParticleIterator ParticleIterator::operator++(int) { ParticleIterator tmp(*this); @@ -231,7 +233,7 @@ namespace Particles template - ParticleIterator & + inline ParticleIterator & ParticleIterator::operator--() { accessor.prev(); @@ -241,7 +243,7 @@ namespace Particles template - ParticleIterator + inline ParticleIterator ParticleIterator::operator--(int) { ParticleIterator tmp(*this);