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:
bool separate_rrs_;
bool ready_;
public:
MemoryIterator(const RRClass rrclass,
MemoryIterator(const RRClass& rrclass,
const ZoneTree& tree, const Name& origin,
bool separate_rrs) :
rrclass_(rrclass),
......
......@@ -165,7 +165,7 @@ ZoneDataLoader::getCurrentName() const {
ZoneData*
loadZoneDataInternal(util::MemorySegment& mem_sgmt,
const isc::dns::RRClass rrclass,
const isc::dns::RRClass& rrclass,
const Name& zone_name,
boost::function<void(LoadCallback)> rrset_installer)
{
......@@ -223,7 +223,7 @@ generateRRsetFromIterator(ZoneIterator* iterator, LoadCallback callback) {
ZoneData*
loadZoneData(util::MemorySegment& mem_sgmt,
const isc::dns::RRClass rrclass,
const isc::dns::RRClass& rrclass,
const isc::dns::Name& zone_name,
const std::string& zone_file)
{
......@@ -236,7 +236,7 @@ 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,
ZoneIterator& iterator)
{
......
......@@ -48,7 +48,7 @@ struct EmptyZone : public InvalidParameter {
/// \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.
ZoneData* loadZoneData(util::MemorySegment& mem_sgmt,
const isc::dns::RRClass rrclass,
const isc::dns::RRClass& rrclass,
const isc::dns::Name& zone_name,
const std::string& zone_file);
......@@ -65,7 +65,7 @@ ZoneData* loadZoneData(util::MemorySegment& mem_sgmt,
/// \param zone_name The name of the zone that is being loaded.
/// \param iterator Iterator that returns RRsets to load into the zone.
ZoneData* loadZoneData(util::MemorySegment& mem_sgmt,
const isc::dns::RRClass rrclass,
const isc::dns::RRClass& rrclass,
const isc::dns::Name& zone_name,
ZoneIterator& iterator);
......
Supports Markdown
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