]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[2428] Code simplification
authorMichal 'vorner' Vaner <michal.vaner@nic.cz>
Wed, 12 Dec 2012 09:35:43 +0000 (10:35 +0100)
committerMichal 'vorner' Vaner <michal.vaner@nic.cz>
Wed, 12 Dec 2012 09:35:43 +0000 (10:35 +0100)
We don't need that intermediate variable

src/lib/dns/master_loader.cc

index 1f7b7d67d189537894e2f6b5ceff092a129fe2ec..da12013b54e92a92a33cf756b24f1ac3db7a353d 100644 (file)
@@ -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,