diff --git a/include/yaml-cpp/emitter.h b/include/yaml-cpp/emitter.h index 210b1ec..3999eb0 100644 --- a/include/yaml-cpp/emitter.h +++ b/include/yaml-cpp/emitter.h @@ -44,7 +44,7 @@ class YAML_CPP_API Emitter { // state checking bool good() const; - const std::string GetLastError() const; + std::string GetLastError() const; // global setters bool SetOutputCharset(EMITTER_MANIP value); diff --git a/src/directives.cpp b/src/directives.cpp index f6e9587..4b82270 100644 --- a/src/directives.cpp +++ b/src/directives.cpp @@ -3,8 +3,7 @@ namespace YAML { Directives::Directives() : version{true, 1, 2}, tags{} {} -const std::string Directives::TranslateTagHandle( - const std::string& handle) const { +std::string Directives::TranslateTagHandle(const std::string& handle) const { auto it = tags.find(handle); if (it == tags.end()) { if (handle == "!!") diff --git a/src/directives.h b/src/directives.h index 333af26..18d14c9 100644 --- a/src/directives.h +++ b/src/directives.h @@ -19,7 +19,7 @@ struct Version { struct Directives { Directives(); - const std::string TranslateTagHandle(const std::string& handle) const; + std::string TranslateTagHandle(const std::string& handle) const; Version version; std::map tags; diff --git a/src/emitter.cpp b/src/emitter.cpp index 644b312..1d30073 100644 --- a/src/emitter.cpp +++ b/src/emitter.cpp @@ -25,9 +25,7 @@ std::size_t Emitter::size() const { return m_stream.pos(); } // state checking bool Emitter::good() const { return m_pState->good(); } -const std::string Emitter::GetLastError() const { - return m_pState->GetLastError(); -} +std::string Emitter::GetLastError() const { return m_pState->GetLastError(); } // global setters bool Emitter::SetOutputCharset(EMITTER_MANIP value) { diff --git a/src/scantag.cpp b/src/scantag.cpp index 176cc5c..63bc1e5 100644 --- a/src/scantag.cpp +++ b/src/scantag.cpp @@ -6,7 +6,7 @@ #include "yaml-cpp/mark.h" namespace YAML { -const std::string ScanVerbatimTag(Stream& INPUT) { +std::string ScanVerbatimTag(Stream& INPUT) { std::string tag; // eat the start character @@ -29,7 +29,7 @@ const std::string ScanVerbatimTag(Stream& INPUT) { throw ParserException(INPUT.mark(), ErrorMsg::END_OF_VERBATIM_TAG); } -const std::string ScanTagHandle(Stream& INPUT, bool& canBeHandle) { +std::string ScanTagHandle(Stream& INPUT, bool& canBeHandle) { std::string tag; canBeHandle = true; Mark firstNonWordChar; @@ -62,7 +62,7 @@ const std::string ScanTagHandle(Stream& INPUT, bool& canBeHandle) { return tag; } -const std::string ScanTagSuffix(Stream& INPUT) { +std::string ScanTagSuffix(Stream& INPUT) { std::string tag; while (INPUT) { diff --git a/src/scantag.h b/src/scantag.h index 522ba54..9fa1684 100644 --- a/src/scantag.h +++ b/src/scantag.h @@ -11,9 +11,9 @@ #include "stream.h" namespace YAML { -const std::string ScanVerbatimTag(Stream& INPUT); -const std::string ScanTagHandle(Stream& INPUT, bool& canBeHandle); -const std::string ScanTagSuffix(Stream& INPUT); +std::string ScanVerbatimTag(Stream& INPUT); +std::string ScanTagHandle(Stream& INPUT, bool& canBeHandle); +std::string ScanTagSuffix(Stream& INPUT); } #endif // SCANTAG_H_62B23520_7C8E_11DE_8A39_0800200C9A66 diff --git a/src/tag.cpp b/src/tag.cpp index df8a2cf..35a1b46 100644 --- a/src/tag.cpp +++ b/src/tag.cpp @@ -29,7 +29,7 @@ Tag::Tag(const Token& token) } } -const std::string Tag::Translate(const Directives& directives) { +std::string Tag::Translate(const Directives& directives) { switch (type) { case VERBATIM: return value; diff --git a/src/tag.h b/src/tag.h index ac30673..c811f39 100644 --- a/src/tag.h +++ b/src/tag.h @@ -23,7 +23,7 @@ struct Tag { }; Tag(const Token& token); - const std::string Translate(const Directives& directives); + std::string Translate(const Directives& directives); TYPE type; std::string handle, value;