From: Michal 'vorner' Vaner Date: Wed, 12 Dec 2012 09:35:43 +0000 (+0100) Subject: [2428] Code simplification X-Git-Tag: bind10-1.0.0-beta-release~16^2~23 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c5526a8ccd41201df0ec98f7b0da06113b9e6e12;p=thirdparty%2Fkea.git [2428] Code simplification We don't need that intermediate variable --- diff --git a/src/lib/dns/master_loader.cc b/src/lib/dns/master_loader.cc index 6d4f26c04f..a798e6415b 100644 --- a/src/lib/dns/master_loader.cc +++ b/src/lib/dns/master_loader.cc @@ -116,14 +116,8 @@ public: void doInclude() { // First, get the filename to include - const MasterToken::StringRegion - filename_tok(lexer_.getNextToken(MasterToken::QSTRING). - getStringRegion()); - - // Push the filename. We abuse the fact that filename - // may not contain '\0' anywhere in it, so we can - // freely use the filename.beg directly. - string filename(filename_tok.beg); + const string + filename(lexer_.getNextToken(MasterToken::QSTRING).getString()); // There could be an origin (or maybe not). So try looking const MasterToken name_tok(lexer_.getNextToken(MasterToken::QSTRING,