diff options
author | Tor Egge <Tor.Egge@online.no> | 2022-09-18 20:58:33 +0200 |
---|---|---|
committer | Tor Egge <Tor.Egge@online.no> | 2022-09-18 20:58:33 +0200 |
commit | 66d205834c9ebde5a740298d6d7d1c171c50a4a5 (patch) | |
tree | 0090e94ce13cb97617cb10bb410b3ef255b6909d /fsa | |
parent | abac32218be6c4cf361d38762e0f97b4e6807b0e (diff) |
Remove ifdefs for g++ version older than g++ 10.
Diffstat (limited to 'fsa')
-rw-r--r-- | fsa/queryproc/permute_query.cpp | 6 | ||||
-rw-r--r-- | fsa/src/alltest/lookup_test.cpp | 6 | ||||
-rw-r--r-- | fsa/src/vespa/fsa/automaton.cpp | 4 | ||||
-rw-r--r-- | fsa/src/vespa/fsa/fsa.h | 177 | ||||
-rw-r--r-- | fsa/src/vespa/fsa/vectorizer.h | 4 | ||||
-rw-r--r-- | fsa/src/vespa/fsamanagers/fsamanager.cpp | 4 |
6 files changed, 0 insertions, 201 deletions
diff --git a/fsa/queryproc/permute_query.cpp b/fsa/queryproc/permute_query.cpp index 0e305ef7b75..7586252210e 100644 --- a/fsa/queryproc/permute_query.cpp +++ b/fsa/queryproc/permute_query.cpp @@ -7,12 +7,6 @@ #include "ngram.h" #include "base64.h" -#if (__GNUG__ <3 || (__GNUG__ == 3 && __GNUC_MINOR__ < 1)) -namespace std { -const char *fixed = ""; -} -#endif - using namespace fsa; unsigned int gram_count(unsigned int mg, unsigned int q) diff --git a/fsa/src/alltest/lookup_test.cpp b/fsa/src/alltest/lookup_test.cpp index d9ae17658d1..19880d7a0a3 100644 --- a/fsa/src/alltest/lookup_test.cpp +++ b/fsa/src/alltest/lookup_test.cpp @@ -7,12 +7,6 @@ #include <vespa/fsa/fsa.h> -#if (__GNUG__ <3 || (__GNUG__ == 3 && __GNUC_MINOR__ < 1)) -namespace std { -const char *left = ""; -} -#endif - using namespace fsa; int main(int argc, char** argv) diff --git a/fsa/src/vespa/fsa/automaton.cpp b/fsa/src/vespa/fsa/automaton.cpp index 57bcfb180a8..75aead62ba5 100644 --- a/fsa/src/vespa/fsa/automaton.cpp +++ b/fsa/src/vespa/fsa/automaton.cpp @@ -638,11 +638,7 @@ void Automaton::cleanUp() _register.clear(); delete _q0; _q0 = NULL; -#if ((__GNUG__ == 3 && __GNUC_MINOR__ >= 1) || __GNUG__ > 3) _previous_input.clear(); -#else - _previous_input = ""; -#endif } } diff --git a/fsa/src/vespa/fsa/fsa.h b/fsa/src/vespa/fsa/fsa.h index f3703b398ba..b6e5789e043 100644 --- a/fsa/src/vespa/fsa/fsa.h +++ b/fsa/src/vespa/fsa/fsa.h @@ -776,35 +776,8 @@ public: */ virtual ~HashedState() {} -#if ((__GNUG__ == 3 && __GNUC_MINOR__ >= 1) || __GNUG__ > 3) using State::start; using State::delta; -#else - virtual bool start(symbol_t in) { start(); return delta(in); } - virtual bool start(const symbol_t *in) { start(); return delta(in); } - virtual bool start(const char *in) { start(); return delta(in); } - virtual bool start(const std::string &in) { start(); return delta(in); } - virtual bool delta(const symbol_t *in) - { - const symbol_t *p=in; - while(*p && _state>0){ - delta(*p); - p++; - } - return _state!=0; - } - virtual bool delta(const char *in) { return delta((const symbol_t *)in); } - virtual bool delta(const std::string &in) - { - unsigned int idx=0; - - while(idx<in.length() && _state>0){ - delta(in[idx]); - idx++; - } - return _state!=0; - } -#endif /** * @brief Set the state to the starting state of the automaton. @@ -923,35 +896,8 @@ public: */ virtual ~CounterState() {} -#if ((__GNUG__ == 3 && __GNUC_MINOR__ >= 1) || __GNUG__ > 3) using State::start; using State::delta; -#else - virtual bool start(symbol_t in) { start(); return delta(in); } - virtual bool start(const symbol_t *in) { start(); return delta(in); } - virtual bool start(const char *in) { start(); return delta(in); } - virtual bool start(const std::string &in) { start(); return delta(in); } - virtual bool delta(const symbol_t *in) - { - const symbol_t *p=in; - while(*p && _state>0){ - delta(*p); - p++; - } - return _state!=0; - } - virtual bool delta(const char *in) { return delta((const symbol_t *)in); } - virtual bool delta(const std::string &in) - { - unsigned int idx=0; - - while(idx<in.length() && _state>0){ - delta(in[idx]); - idx++; - } - return _state!=0; - } -#endif /** * @brief Set the state to the starting state of the automaton. @@ -1240,35 +1186,8 @@ public: */ virtual ~MemoryState() {} -#if ((__GNUG__ == 3 && __GNUC_MINOR__ >= 1) || __GNUG__ > 3) using State::start; using State::delta; -#else - virtual bool start(symbol_t in) { start(); return delta(in); } - virtual bool start(const symbol_t *in) { start(); return delta(in); } - virtual bool start(const char *in) { start(); return delta(in); } - virtual bool start(const std::string &in) { start(); return delta(in); } - virtual bool delta(const symbol_t *in) - { - const symbol_t *p=in; - while(*p && _state>0){ - delta(*p); - p++; - } - return _state!=0; - } - virtual bool delta(const char *in) { return delta((const symbol_t *)in); } - virtual bool delta(const std::string &in) - { - unsigned int idx=0; - - while(idx<in.length() && _state>0){ - delta(in[idx]); - idx++; - } - return _state!=0; - } -#endif /** * @brief Set the state to the starting state of the automaton. @@ -1280,11 +1199,7 @@ public: */ bool start() override { -#if ((__GNUG__ == 3 && __GNUC_MINOR__ >= 1) || __GNUG__ > 3) _memory.clear(); -#else - _memory = ""; -#endif return State::start(); } @@ -1425,35 +1340,8 @@ public: */ virtual ~HashedMemoryState() {} -#if ((__GNUG__ == 3 && __GNUC_MINOR__ >= 1) || __GNUG__ > 3) using State::start; using State::delta; -#else - virtual bool start(symbol_t in) { start(); return delta(in); } - virtual bool start(const symbol_t *in) { start(); return delta(in); } - virtual bool start(const char *in) { start(); return delta(in); } - virtual bool start(const std::string &in) { start(); return delta(in); } - virtual bool delta(const symbol_t *in) - { - const symbol_t *p=in; - while(*p && _state>0){ - delta(*p); - p++; - } - return _state!=0; - } - virtual bool delta(const char *in) { return delta((const symbol_t *)in); } - virtual bool delta(const std::string &in) - { - unsigned int idx=0; - - while(idx<in.length() && _state>0){ - delta(in[idx]); - idx++; - } - return _state!=0; - } -#endif /** * @brief Set the state to the starting state of the automaton. @@ -1466,11 +1354,7 @@ public: bool start() override { _hash = 0; -#if ((__GNUG__ == 3 && __GNUC_MINOR__ >= 1) || __GNUG__ > 3) _memory.clear(); -#else - _memory = ""; -#endif return State::start(); } @@ -1606,35 +1490,8 @@ public: */ virtual ~HashedCounterState() {} -#if ((__GNUG__ == 3 && __GNUC_MINOR__ >= 1) || __GNUG__ > 3) using State::start; using State::delta; -#else - virtual bool start(symbol_t in) { start(); return delta(in); } - virtual bool start(const symbol_t *in) { start(); return delta(in); } - virtual bool start(const char *in) { start(); return delta(in); } - virtual bool start(const std::string &in) { start(); return delta(in); } - virtual bool delta(const symbol_t *in) - { - const symbol_t *p=in; - while(*p && _state>0){ - delta(*p); - p++; - } - return _state!=0; - } - virtual bool delta(const char *in) { return delta((const symbol_t *)in); } - virtual bool delta(const std::string &in) - { - unsigned int idx=0; - - while(idx<in.length() && _state>0){ - delta(in[idx]); - idx++; - } - return _state!=0; - } -#endif /** * @brief Set the state to the starting state of the automaton. @@ -1749,30 +1606,7 @@ public: uint32_t _counter; /**< Counter value. */ -#if ((__GNUG__ == 3 && __GNUC_MINOR__ >= 1) || __GNUG__ > 3) using State::delta; -#else - virtual bool delta(const symbol_t *in) - { - const symbol_t *p=in; - while(*p && _state>0){ - delta(*p); - p++; - } - return _state!=0; - } - virtual bool delta(const char *in) { return delta((const symbol_t *)in); } - virtual bool delta(const std::string &in) - { - unsigned int idx=0; - - while(idx<in.length() && _state>0){ - delta(in[idx]); - idx++; - } - return _state!=0; - } -#endif /** * @brief Delta transition for hashed word counter states. @@ -1933,17 +1767,6 @@ public: // }}} -#if (__GNUG__ < 3 || (__GNUG__ == 3 && __GNUC_MINOR__ < 1)) - friend class State; - friend class HashedState; - friend class MemoryState; - friend class HashedMemoryState; - friend class CounterState; - friend class HashedCounterState; - friend class WordCounterState; - friend class HashedWordCounterState; -#endif - public: /** * @brief Magic number for identifying fsa files. diff --git a/fsa/src/vespa/fsa/vectorizer.h b/fsa/src/vespa/fsa/vectorizer.h index 6ce94e92569..7e61c4f6d88 100644 --- a/fsa/src/vespa/fsa/vectorizer.h +++ b/fsa/src/vespa/fsa/vectorizer.h @@ -448,10 +448,6 @@ private: // }}} -#if (__GNUG__<3 || (__GNUG__ == 3 && __GNUC_MINOR__ < 1)) - friend RawVector::iterator; -#endif - private: /** diff --git a/fsa/src/vespa/fsamanagers/fsamanager.cpp b/fsa/src/vespa/fsamanagers/fsamanager.cpp index c26e49adedd..037e0f53f79 100644 --- a/fsa/src/vespa/fsamanagers/fsamanager.cpp +++ b/fsa/src/vespa/fsamanagers/fsamanager.cpp @@ -42,11 +42,7 @@ bool FSAManager::load(const std::string &id, const std::string &url) { std::string file=url; -#if ((__GNUG__ == 3 && __GNUC_MINOR__ >= 1) || __GNUG__ > 3) if(!url.compare(0,7,"http://")) -#else - if(!url.compare("http://",0,7)) -#endif { unsigned int pos=url.find_last_of('/'); if(pos==url.size()-1) return false; |