]> 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)
committerJINMEI Tatuya <jinmei@isc.org>
Wed, 12 Dec 2012 22:54:01 +0000 (14:54 -0800)
We don't need that intermediate variable

src/lib/dns/master_loader.cc

index 6d4f26c04f2163a9d2b171bad0daef4a6a9ee654..a798e6415b6dc350a0452a074a08d283ee22db0e 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,