diff C++/Parser.cpp @ 210:3b0e276f0866

Parser: update and merge
author David Demelier <markand@malikania.fr>
date Mon, 03 Mar 2014 08:48:31 +0100
parents 9f22ce5f1b39 706f861c4c6d
children ca69910b1407
line wrap: on
line diff
--- a/C++/Parser.cpp	Fri Feb 28 16:51:09 2014 +0100
+++ b/C++/Parser.cpp	Mon Mar 03 08:48:31 2014 +0100
@@ -32,9 +32,9 @@
 {
 }
 
-Section::Section(const std::string &name)
+Section::Section(const std::string &name, bool allowed)
 	: m_name(name)
-	, m_allowed(true)
+	, m_allowed(allowed)
 {
 
 }
@@ -232,11 +232,7 @@
 	, m_tuning(tuning)
 	, m_commentChar(commentToken)
 {
-	Section s("");
-
-	s.m_allowed = (tuning & DisableRootSection) ? false : true;
-
-	m_sections.push_back(s);
+	m_sections.push_back(Section("", (tuning & DisableRootSection) ? false : true));
 	open();
 }