Commit 70473ce1 authored by Michal 'vorner' Vaner's avatar Michal 'vorner' Vaner
Browse files

[2209] Pass objects by const reference

Passing it as const RRClass (and making a copy) makes no real sense. It
looks more expected with the reference and might even be slightly
faster.
parent 4a9e338f
...@@ -221,7 +221,7 @@ private: ...@@ -221,7 +221,7 @@ private:
bool separate_rrs_; bool separate_rrs_;
bool ready_; bool ready_;
public: public:
MemoryIterator(const RRClass rrclass, MemoryIterator(const RRClass& rrclass,
const ZoneTree& tree, const Name& origin, const ZoneTree& tree, const Name& origin,
bool separate_rrs) : bool separate_rrs) :
rrclass_(rrclass), rrclass_(rrclass),
......
...@@ -165,7 +165,7 @@ ZoneDataLoader::getCurrentName() const { ...@@ -165,7 +165,7 @@ ZoneDataLoader::getCurrentName() const {
ZoneData* ZoneData*
loadZoneDataInternal(util::MemorySegment& mem_sgmt, loadZoneDataInternal(util::MemorySegment& mem_sgmt,
const isc::dns::RRClass rrclass, const isc::dns::RRClass& rrclass,
const Name& zone_name, const Name& zone_name,
boost::function<void(LoadCallback)> rrset_installer) boost::function<void(LoadCallback)> rrset_installer)
{ {
...@@ -223,7 +223,7 @@ generateRRsetFromIterator(ZoneIterator* iterator, LoadCallback callback) { ...@@ -223,7 +223,7 @@ generateRRsetFromIterator(ZoneIterator* iterator, LoadCallback callback) {
ZoneData* ZoneData*
loadZoneData(util::MemorySegment& mem_sgmt, loadZoneData(util::MemorySegment& mem_sgmt,
const isc::dns::RRClass rrclass, const isc::dns::RRClass& rrclass,
const isc::dns::Name& zone_name, const isc::dns::Name& zone_name,
const std::string& zone_file) const std::string& zone_file)
{ {
...@@ -236,7 +236,7 @@ loadZoneData(util::MemorySegment& mem_sgmt, ...@@ -236,7 +236,7 @@ loadZoneData(util::MemorySegment& mem_sgmt,
ZoneData* ZoneData*
loadZoneData(util::MemorySegment& mem_sgmt, loadZoneData(util::MemorySegment& mem_sgmt,
const isc::dns::RRClass rrclass, const isc::dns::RRClass& rrclass,
const isc::dns::Name& zone_name, const isc::dns::Name& zone_name,
ZoneIterator& iterator) ZoneIterator& iterator)
{ {
......
...@@ -48,7 +48,7 @@ struct EmptyZone : public InvalidParameter { ...@@ -48,7 +48,7 @@ struct EmptyZone : public InvalidParameter {
/// \param zone_name The name of the zone that is being loaded. /// \param zone_name The name of the zone that is being loaded.
/// \param zone_file Filename which contains the zone data for \c zone_name. /// \param zone_file Filename which contains the zone data for \c zone_name.
ZoneData* loadZoneData(util::MemorySegment& mem_sgmt, ZoneData* loadZoneData(util::MemorySegment& mem_sgmt,
const isc::dns::RRClass rrclass, const isc::dns::RRClass& rrclass,
const isc::dns::Name& zone_name, const isc::dns::Name& zone_name,
const std::string& zone_file); const std::string& zone_file);
...@@ -65,7 +65,7 @@ ZoneData* loadZoneData(util::MemorySegment& mem_sgmt, ...@@ -65,7 +65,7 @@ ZoneData* loadZoneData(util::MemorySegment& mem_sgmt,
/// \param zone_name The name of the zone that is being loaded. /// \param zone_name The name of the zone that is being loaded.
/// \param iterator Iterator that returns RRsets to load into the zone. /// \param iterator Iterator that returns RRsets to load into the zone.
ZoneData* loadZoneData(util::MemorySegment& mem_sgmt, ZoneData* loadZoneData(util::MemorySegment& mem_sgmt,
const isc::dns::RRClass rrclass, const isc::dns::RRClass& rrclass,
const isc::dns::Name& zone_name, const isc::dns::Name& zone_name,
ZoneIterator& iterator); ZoneIterator& iterator);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment