Git-Url: http://git.frugalware.org/gitweb/gitweb.cgi?p=pacman-g2.git;a=commitdiff;h=e39631ea196c6c3fcd2c8700152e4891395d78c9
commit e39631ea196c6c3fcd2c8700152e4891395d78c9 Author: Michel Hermier <[email protected]> Date: Tue Oct 21 15:10:23 2014 +0200 libpacman: Remove FMatcher. diff --git a/lib/libpacman/kernel/fstr.h b/lib/libpacman/kernel/fstr.h index a249527..b482d05 100644 --- a/lib/libpacman/kernel/fstr.h +++ b/lib/libpacman/kernel/fstr.h @@ -23,14 +23,11 @@ #include "fstring.h" -#include "util/fmatcher.h" - #include <regex.h> class FStringList; -class FStrMatcher - : public FMatcher<const char *> +class FStrMatcher final { public: enum { @@ -48,7 +45,7 @@ public: ~FStrMatcher(); - virtual bool match(const char *str) const override; + bool match(const char *str) const; protected: int m_flags; diff --git a/lib/libpacman/util/fcomparator.h b/lib/libpacman/util/fcomparator.h index 8e82dfa..d662b20 100644 --- a/lib/libpacman/util/fcomparator.h +++ b/lib/libpacman/util/fcomparator.h @@ -25,7 +25,6 @@ template <typename T> class FComparator - : public FMatcher<T> { public: FComparator() diff --git a/lib/libpacman/util/fmatcher.h b/lib/libpacman/util/fmatcher.h deleted file mode 100644 index ebb8c34..0000000 --- a/lib/libpacman/util/fmatcher.h +++ /dev/null @@ -1,66 +0,0 @@ -/* - * fmatcher.h - * - * Copyright (c) 2014 by Michel Hermier <[email protected]> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, - * USA. - */ -#ifndef F_MATCHER_H -#define F_MATCHER_H - -#include "fstdlib.h" -#include "util.h" - -template <typename T> -class FMatcher -{ -public: - FMatcher() - { } - - virtual ~FMatcher() - { } - - virtual bool match(T data) const = 0; - -protected: - FMatcher(const FMatcher<T> &o) - { } - - FMatcher<T> &operator = (const FMatcher<T> &o) - { - return *this; - } -}; - -namespace flib -{ - template <class T, class U> - bool match(const T &val, const FMatcher<U> &matcher) - { - return flib::match(matcher, val); - } - - template <class T, class U> - bool match(const FMatcher<T> &matcher, const U &val) - { - return matcher.match(val); - } -} - -#endif /* F_MATCHER_H */ - -/* vim: set ts=2 sw=2 noet: */ _______________________________________________ Frugalware-git mailing list [email protected] http://frugalware.org/mailman/listinfo/frugalware-git
