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 59b969e2c1c7181e659c110c65b64d199aa31338..6dfe4652c3c35326a7c75c125d6fa2b1956e820c 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 61c1d16350186e55f9e9b011838154a401634c9d..56173d7d7102a93a42f808216841048a9b8713b8 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 f9fc74b0852537939cee4407eb05da309b07d115..d9dd4433cc26a34b745aa57ae342e64bc5bec18b 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 d86d5ae7ff2138e60672b9d988b4af320da65270..338ccc35a068ccab95149b08a4cb2f2367b3aa3f 100644 (file)
@@ -41,7 +41,7 @@ private:
 
        bool loaded {};
        PoDoFo::PdfMemDocument pdf {};
-       std::unique_ptr<IRunnable> runner {};
+       std::unique_ptr<IRunnable> _runner {};
 };
 
 }
index bfa060dc43491123925d6ffaf00f693b5160c449..6f64f514663660a2d4c7a349128c6ecd6bef18e0 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 c73240d1dfaf43623e0678cfcfffe38d28040ccd..7a3b409e3ec5a5b4eb2e4a7245b9a3588ffc01d0 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