Fix build error for product TV 80/308180/2 accepted/tizen/unified/20240320.110714 accepted/tizen/unified/20240320.151931
authorJiyong <jiyong.min@samsung.com>
Tue, 19 Mar 2024 06:00:06 +0000 (15:00 +0900)
committerMinje ahn <minje.ahn@samsung.com>
Wed, 20 Mar 2024 00:26:18 +0000 (00:26 +0000)
 - error: declaration of 'keyword'/'runner' shadows

Change-Id: Ia41309fa534f6e6a9c8112e2cca9a1c80a564415

plugin/media-ebook-plugin-epub.cpp
plugin/media-ebook-plugin-epub.h
plugin/media-ebook-plugin-pdf.cpp
plugin/media-ebook-plugin-pdf.h
plugin/media-ebook-plugin-regmatch.cpp
plugin/media-ebook-plugin-regmatch.h

index 59b969e..6dfe465 100644 (file)
@@ -32,7 +32,7 @@
 using namespace EBook;
 
 Epub::Epub(std::string path, std::unique_ptr<IRunnable> runner)
-       : runner(std::move(runner))
+       : _runner(std::move(runner))
 {
        if (path.empty()) {
                LOGE("invalid path");
@@ -106,7 +106,7 @@ bool Epub::htmlNodeFindRecursive(xmlNodePtr node)
 {
        for (xmlNodePtr cur = node; cur; cur = cur->next) {
                if (cur->type == XML_TEXT_NODE &&
-                       runner->run(reinterpret_cast<char*>(cur->content)))
+                       _runner->run(reinterpret_cast<char*>(cur->content)))
                        return true;
 
                if (htmlNodeFindRecursive(cur->children))
@@ -161,7 +161,7 @@ void Epub::htmlNodeInsertRecursive(xmlNodePtr node)
 {
        for (xmlNodePtr cur = node; cur; cur = cur->next) {
                if (cur->type == XML_TEXT_NODE)
-                       runner->run(reinterpret_cast<char*>(cur->content));
+                       _runner->run(reinterpret_cast<char*>(cur->content));
 
                htmlNodeInsertRecursive(cur->children);
        }
index 61c1d16..56173d7 100644 (file)
@@ -48,7 +48,7 @@ private:
        void htmlNodeInsertRecursive(xmlNodePtr node);
 
        zip_t* z {};
-       std::unique_ptr<IRunnable> runner {};
+       std::unique_ptr<IRunnable> _runner {};
 };
 
 }
index f9fc74b..d9dd443 100644 (file)
@@ -31,7 +31,7 @@
 using namespace EBook;
 
 Pdf::Pdf(std::string path, std::unique_ptr<IRunnable> runner)
-       : runner(std::move(runner))
+       : _runner(std::move(runner))
 {
        if (path.empty()) {
                LOGE("invalid path");
@@ -56,7 +56,7 @@ bool Pdf::find()
                return false;
 
        for (int n = 0; n < pdf.GetPageCount(); ++n)
-               if (runner->run(parseTextFromPage(n)))
+               if (_runner->run(parseTextFromPage(n)))
                        return true;
 
        return false;
@@ -68,7 +68,7 @@ void Pdf::insert()
                return;
 
        for (int n = 0; n < pdf.GetPageCount(); ++n)
-               runner->run(parseTextFromPage(n));
+               _runner->run(parseTextFromPage(n));
 }
 
 std::string Pdf::parseTextFromPage(unsigned int index)
index d86d5ae..338ccc3 100644 (file)
@@ -41,7 +41,7 @@ private:
 
        bool loaded {};
        PoDoFo::PdfMemDocument pdf {};
-       std::unique_ptr<IRunnable> runner {};
+       std::unique_ptr<IRunnable> _runner {};
 };
 
 }
index bfa060d..6f64f51 100644 (file)
@@ -31,10 +31,10 @@ bool RegMatch::run(const std::string& text)
        if (text.empty())
                return false;
 
-       std::regex re(keyword, std::regex::icase);
+       std::regex re(_keyword, std::regex::icase);
 
        if (std::regex_search(text, re)) {
-               LOGD("Found [%s]", keyword.c_str());
+               LOGD("Found [%s]", _keyword.c_str());
                return true;
        }
 
index c73240d..7a3b409 100644 (file)
@@ -27,13 +27,13 @@ class RegMatch : public IRunnable
 {
 public:
        explicit RegMatch(const char *keyword)
-               : keyword(keyword) { }
+               : _keyword(keyword) { }
        ~RegMatch() override = default;
 
        bool run(const std::string& text) override;
 
 private:
-       std::string keyword {};
+       std::string _keyword {};
 };
 
 #endif
\ No newline at end of file