Parcourir la source

[2428] Code simplification

We don't need that intermediate variable
Michal 'vorner' Vaner il y a 12 ans
Parent
commit
3fda721ea7
1 fichiers modifiés avec 2 ajouts et 8 suppressions
  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,