From 49b815a6db0b8b3c070a00993afcf820e3fd2c78 Mon Sep 17 00:00:00 2001 From: trotFunky Date: Tue, 21 May 2019 12:48:08 +0200 Subject: [PATCH] Correct indent for printing --- snippets/CMakeLists.txt | 1 - xmlParser/Circle.cpp | 7 ++++++- xmlParser/Circle.h | 2 +- xmlParser/DrawingElement.cpp | 9 +++++++-- xmlParser/DrawingElement.h | 3 ++- xmlParser/Group.cpp | 9 +++++++-- xmlParser/Group.h | 2 +- 7 files changed, 24 insertions(+), 9 deletions(-) diff --git a/snippets/CMakeLists.txt b/snippets/CMakeLists.txt index a03ef56..e15085c 100644 --- a/snippets/CMakeLists.txt +++ b/snippets/CMakeLists.txt @@ -40,7 +40,6 @@ endif() add_executable(compte_mots compte_mots.cpp) add_library(polynomial SHARED Polynomial.cpp Polynomial.tpp) -#target_link_libraries(polynomial -static) if(GTest_FOUND) add_executable(polynomialTest gTestPolynomial.cpp) diff --git a/xmlParser/Circle.cpp b/xmlParser/Circle.cpp index d320994..338ed92 100644 --- a/xmlParser/Circle.cpp +++ b/xmlParser/Circle.cpp @@ -42,9 +42,14 @@ namespace xmlParser shape->setPosition(x-r,y-r); } - const std::string Circle::toString() const + const std::string Circle::toString(int indent) const { std::stringstream string; + for(int i = 0;itoString(indent+1) << std::endl; } return(string.str()); } diff --git a/xmlParser/Group.h b/xmlParser/Group.h index 99c7a42..f1c9141 100644 --- a/xmlParser/Group.h +++ b/xmlParser/Group.h @@ -34,7 +34,7 @@ namespace xmlParser void draw(sf::RenderWindow&) override; - const std::string toString() const override; + const std::string toString(int indent) const override; private: std::map drawingElements; };