From 9b7fa8b7ecc9c8158240bd4626ba22e4145415c2 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Tue, 7 Oct 2014 23:12:03 -0400 Subject: [PATCH] Parser - No point checking return value of 'new' operator, because it throws. --- src/Parser.cpp | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/Parser.cpp b/src/Parser.cpp index 6a136058f..a5d526d56 100644 --- a/src/Parser.cpp +++ b/src/Parser.cpp @@ -637,9 +637,6 @@ Tree* Parser::captureFirst (const std::string& arg) { // Insert the arg as the new first branch. Tree* t = new Tree ("argIns"); - if (!t) - throw std::string (STRING_ERROR_MEMORY); - t->attribute ("raw", arg); t->tag ("?"); t->_trunk = _tree; @@ -660,9 +657,6 @@ Tree* Parser::captureLast (const std::string& arg) { // Insert the arg as the new first branch. Tree* t = new Tree ("argIns"); - if (!t) - throw std::string (STRING_ERROR_MEMORY); - t->attribute ("raw", arg); t->tag ("?"); t->_trunk = _tree;