[bind10-dev] BIND 10 trac503, updated. implement ANY query logic
Jerry
jerry.zzpku at gmail.com
Wed Jan 26 09:18:14 UTC 2011
> This just got my attention. Not that it would be a problem, just a small
> suggestion. This way the RRsetList is created each time. It probably isn't
> much, but ANY queries are rare.
>
> I would suggest using an
> std::auto_ptr<RRsetList> target(qtype_is_any ? new RRSetList : NULL)
>
> This way the RRsetList is created only when needed, the code complexity
> doesn't grow and the auto_ptr is simple enough to be eliminated completely
> in optimisations.
>
> What do you think?
Good suggestion, it also make the code more clean.
--
Jerry
More information about the bind10-dev
mailing list