Browse Source

[2428] Code simplification

We don't need that intermediate variable
Michal 'vorner' Vaner 12 years ago
parent
commit
3fda721ea7
1 changed files with 2 additions and 8 deletions
  1. 2 8
      src/lib/dns/master_loader.cc

+ 2 - 8
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,