Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: src/plugin/PluginFilter.cpp

Issue 5338258498125824: Noissue - Removed unused filter-map variables (Closed)
Patch Set: Created Feb. 11, 2015, 5:39 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/plugin/PluginFilter.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * This file is part of Adblock Plus <https://adblockplus.org/>, 2 * This file is part of Adblock Plus <https://adblockplus.org/>,
3 * Copyright (C) 2006-2015 Eyeo GmbH 3 * Copyright (C) 2006-2015 Eyeo GmbH
4 * 4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify 5 * Adblock Plus is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as 6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * Adblock Plus is distributed in the hope that it will be useful, 9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 674 matching lines...) Expand 10 before | Expand all | Expand 10 after
685 } 685 }
686 } 686 }
687 687
688 return isRead; 688 return isRead;
689 } 689 }
690 690
691 void CPluginFilter::ClearFilters() 691 void CPluginFilter::ClearFilters()
692 { 692 {
693 // Clear filter maps 693 // Clear filter maps
694 CriticalSection::Lock filterEngineLock(s_criticalSectionFilterMap); 694 CriticalSection::Lock filterEngineLock(s_criticalSectionFilterMap);
695 { 695 m_elementHideTags.clear();
696 for (int i = 0; i < 2; i++) 696 m_elementHideTagsId.clear();
697 { 697 m_elementHideTagsClass.clear();
698 for (int j = 0; j < 2; j++)
699 {
700 m_filterMap[i][j].clear();
701 }
702 m_filterMapDefault[i].clear();
703 }
704
705 m_elementHideTags.clear();
706 m_elementHideTagsId.clear();
707 m_elementHideTagsClass.clear();
708 }
709 } 698 }
710 699
711 bool CPluginFilter::ShouldBlock(const std::wstring& src, AdblockPlus::FilterEngi ne::ContentType contentType, const std::wstring& domain, bool addDebug) const 700 bool CPluginFilter::ShouldBlock(const std::wstring& src, AdblockPlus::FilterEngi ne::ContentType contentType, const std::wstring& domain, bool addDebug) const
712 { 701 {
713 std::wstring srcTrimmed = TrimString(src); 702 std::wstring srcTrimmed = TrimString(src);
714 703
715 // We should not block the empty string, so all filtering does not make sense 704 // We should not block the empty string, so all filtering does not make sense
716 // Therefore we just return 705 // Therefore we just return
717 if (srcTrimmed.empty()) 706 if (srcTrimmed.empty())
718 { 707 {
(...skipping 14 matching lines...) Expand all
733 CPluginDebug::DebugResultBlocking(ToCString(type), srcTrimmed, domain); 722 CPluginDebug::DebugResultBlocking(ToCString(type), srcTrimmed, domain);
734 } 723 }
735 else 724 else
736 { 725 {
737 CPluginDebug::DebugResultIgnoring(ToCString(type), srcTrimmed, domain); 726 CPluginDebug::DebugResultIgnoring(ToCString(type), srcTrimmed, domain);
738 } 727 }
739 } 728 }
740 #endif 729 #endif
741 return result; 730 return result;
742 } 731 }
OLDNEW
« no previous file with comments | « src/plugin/PluginFilter.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld