From 1241140f4d399f8e3f670691f4c274fdc814d8b6 Mon Sep 17 00:00:00 2001 From: Hiroshi Matoba Date: Wed, 26 Sep 2018 14:53:37 +0200 Subject: [PATCH 1/2] Bugfix vs project template (pt.2) (#6130) --- scripts/templates/vs/emptyExample.vcxproj | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/templates/vs/emptyExample.vcxproj b/scripts/templates/vs/emptyExample.vcxproj index 574dda5caed..5a5e7c98cca 100644 --- a/scripts/templates/vs/emptyExample.vcxproj +++ b/scripts/templates/vs/emptyExample.vcxproj @@ -103,6 +103,7 @@ Level3 %(AdditionalIncludeDirectories) CompileAsCpp + $(IntDir) true @@ -124,6 +125,7 @@ %(AdditionalIncludeDirectories) CompileAsCpp true + $(IntDir) true @@ -144,6 +146,7 @@ %(AdditionalIncludeDirectories) CompileAsCpp true + $(IntDir) false @@ -166,6 +169,7 @@ Level3 %(AdditionalIncludeDirectories) CompileAsCpp + $(IntDir) false From 83dc9c5b495e265928aaed7454eca9826b1d4052 Mon Sep 17 00:00:00 2001 From: arturo castro Date: Fri, 28 Sep 2018 10:31:36 +0200 Subject: [PATCH 2/2] ofXml: add clear method which clears the xml doc --- libs/openFrameworks/utils/ofXml.cpp | 5 +++++ libs/openFrameworks/utils/ofXml.h | 1 + 2 files changed, 6 insertions(+) diff --git a/libs/openFrameworks/utils/ofXml.cpp b/libs/openFrameworks/utils/ofXml.cpp index 6a90160070b..33b07daafed 100644 --- a/libs/openFrameworks/utils/ofXml.cpp +++ b/libs/openFrameworks/utils/ofXml.cpp @@ -52,6 +52,11 @@ bool ofXml::save(const std::filesystem::path & file) const{ return false; } +void ofXml::clear(){ + doc.reset(new pugi::xml_document); + xml = doc->root(); +} + std::string ofXml::toString(const std::string & indent) const{ ostringstream stream; if(xml == doc->root()){ diff --git a/libs/openFrameworks/utils/ofXml.h b/libs/openFrameworks/utils/ofXml.h index 164baa61bda..67a132c40d6 100644 --- a/libs/openFrameworks/utils/ofXml.h +++ b/libs/openFrameworks/utils/ofXml.h @@ -104,6 +104,7 @@ class ofXml{ bool load(const ofBuffer & buffer); bool parse(const std::string & xmlStr); bool save(const std::filesystem::path & file) const; + void clear(); std::string toString(const std::string & indent = "\t") const; ofXml getChild(const std::string & name) const;