From a1e98443c7b186909087c87d20912bc794ced7f6 Mon Sep 17 00:00:00 2001 From: Wvader <34067397+wvader@users.noreply.github.com> Date: Sat, 5 Nov 2022 18:43:43 +0000 Subject: [PATCH] Remove include folder --- CMakeLists.txt | 7 +++---- include/augSettings.cpp => augSettings.cpp | 0 include/augSettings.h => augSettings.h | 0 main.cpp | 18 +++--------------- main.h | 2 +- 5 files changed, 7 insertions(+), 20 deletions(-) rename include/augSettings.cpp => augSettings.cpp (100%) rename include/augSettings.h => augSettings.h (100%) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1b11056..a19e2c5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,10 +9,9 @@ set(GCC_COVERAGE_COMPILE_FLAGS "-fdeclspec") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${GCC_COVERAGE_COMPILE_FLAGS}") add_library(clAugeas SHARED - include/augSettings.cpp - include/augSettings.h - - main.cpp main.h include/pair.cpp) + augSettings.cpp + augSettings.h + main.cpp main.h) target_link_libraries(clAugeas augeas) diff --git a/include/augSettings.cpp b/augSettings.cpp similarity index 100% rename from include/augSettings.cpp rename to augSettings.cpp diff --git a/include/augSettings.h b/augSettings.h similarity index 100% rename from include/augSettings.h rename to augSettings.h diff --git a/main.cpp b/main.cpp index 67c23a3..9636d72 100644 --- a/main.cpp +++ b/main.cpp @@ -131,10 +131,9 @@ CLAPI const char* get_tree( return ""; } - std::map stdBindList; std::map ::iterator pos; - std::stringstream rstream; + std::stringstream ss; char line[256]; @@ -160,22 +159,11 @@ CLAPI const char* get_tree( value.erase(value.begin()); value.erase(value.end() - 1); - rstream << ";K;" << key << ";VAL;" << value << ";ENDL;"; - - stdBindList.insert(std::pair(key,value)); // 2 - + ss << ";K;" << key << ";VAL;" << value << ";ENDL;"; } fclose(out); - - - for (pos = stdBindList.begin();pos!=stdBindList.end();pos++) - { - std::cout << "Key: " << pos->first << ";" << " Value: " << pos->second << std::endl; - } - - return strdup(rstream.str().c_str()); - + return strdup(ss.str().c_str()); } CLAPI void free_str(char* str) { diff --git a/main.h b/main.h index f5e356a..cc6aadf 100644 --- a/main.h +++ b/main.h @@ -3,7 +3,7 @@ #include "augeas.h" #include "map" #include -#include "include/augSettings.h" +#include "augSettings.h" #if defined(_WIN32) #define CLAPI __declspec(dllexport)