From a233f8d4df5e6f46b839a24910c93fa3a7275bd3 Mon Sep 17 00:00:00 2001 From: Tomasz Sowa Date: Tue, 14 Feb 2012 20:34:37 +0000 Subject: [PATCH] added: to Space: void RemoveSpace(size_t child_index) git-svn-id: svn://ttmath.org/publicrep/pikotools/trunk@384 e52654a7-88a9-db11-a3e9-0013d4bc506e --- confparser/space.cpp | 12 ++++++++++++ confparser/space.h | 4 ++++ 2 files changed, 16 insertions(+) diff --git a/confparser/space.cpp b/confparser/space.cpp index 9c1afef..4aa91a6 100755 --- a/confparser/space.cpp +++ b/confparser/space.cpp @@ -489,6 +489,18 @@ return AddSpace(name); } +void Space::RemoveSpace(size_t child_index) +{ + if( child_index < spaces.size() ) + { + delete spaces[child_index]; + spaces.erase(spaces.begin() + child_index); + } +} + + + + // in lists we don't use default values bool Space::ListText(const wchar_t * name, std::vector & list) diff --git a/confparser/space.h b/confparser/space.h index 62fc30e..46efa8b 100755 --- a/confparser/space.h +++ b/confparser/space.h @@ -239,6 +239,10 @@ public: Space & FindAddSpace(const wchar_t * name); Space & FindAddSpace(const std::wstring & name); + + void RemoveSpace(size_t child_index); + + /* * *