diff C++/Parser.cpp @ 209:706f861c4c6d

Little cleanup and rename getValue -> getOption
author David Demelier <markand@malikania.fr>
date Fri, 24 Jan 2014 09:17:06 +0100
parents 1ffe6d4937b7
children 3b0e276f0866
line wrap: on
line diff
--- a/C++/Parser.cpp	Thu Jan 23 14:56:50 2014 +0100
+++ b/C++/Parser.cpp	Fri Jan 24 09:17:06 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)
 {
 
 }
@@ -227,11 +227,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();
 }