Commit b63b9aac authored by Michal 'vorner' Vaner's avatar Michal 'vorner' Vaner
Browse files

[trac1061] Don't return reference

While it works for in-memory zone and similar, it can't be done with
databases, as the database returns some primitive data and it must be
created on the spot.
parent 14a07662
......@@ -122,8 +122,8 @@ public:
masterLoad(zone_stream, origin_, rrclass_,
boost::bind(&MockZoneFinder::loadRRset, this, _1));
}
virtual const isc::dns::Name& getOrigin() const { return (origin_); }
virtual const isc::dns::RRClass& getClass() const { return (rrclass_); }
virtual isc::dns::Name getOrigin() const { return (origin_); }
virtual isc::dns::RRClass getClass() const { return (rrclass_); }
virtual FindResult find(const isc::dns::Name& name,
const isc::dns::RRType& type,
RRsetList* target = NULL,
......
......@@ -139,8 +139,8 @@ public:
* calls to the connection.
*/
Finder(DatabaseConnection& connection, int zone_id);
virtual const isc::dns::Name& getOrigin() const;
virtual const isc::dns::RRClass& getClass() const;
virtual isc::dns::Name getOrigin() const;
virtual isc::dns::RRClass getClass() const;
virtual FindResult find(const isc::dns::Name& name,
const isc::dns::RRType& type,
isc::dns::RRsetList* target = NULL,
......
......@@ -606,12 +606,12 @@ InMemoryZoneFinder::~InMemoryZoneFinder() {
delete impl_;
}
const Name&
Name
InMemoryZoneFinder::getOrigin() const {
return (impl_->origin_);
}
const RRClass&
RRClass
InMemoryZoneFinder::getClass() const {
return (impl_->zone_class_);
}
......
......@@ -58,10 +58,10 @@ public:
//@}
/// \brief Returns the origin of the zone.
virtual const isc::dns::Name& getOrigin() const;
virtual isc::dns::Name getOrigin() const;
/// \brief Returns the class of the zone.
virtual const isc::dns::RRClass& getClass() const;
virtual isc::dns::RRClass getClass() const;
/// \brief Looks up an RRset in the zone.
///
......
......@@ -131,10 +131,10 @@ public:
/// These methods should never throw an exception.
//@{
/// Return the origin name of the zone.
virtual const isc::dns::Name& getOrigin() const = 0;
virtual isc::dns::Name getOrigin() const = 0;
/// Return the RR class of the zone.
virtual const isc::dns::RRClass& getClass() const = 0;
virtual isc::dns::RRClass getClass() const = 0;
//@}
///
......
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