all repos — fluxbox @ cb14466431e2e1ce56d47fcd3c3ec98d0fa1fa29

custom fork of the fluxbox windowmanager

minor fixes
fluxgen fluxgen
commit

cb14466431e2e1ce56d47fcd3c3ec98d0fa1fa29

parent

6add92330be5c62d039469d28ce8d899d613bba6

2 files changed, 19 insertions(+), 11 deletions(-)

jump to
M src/RegExp.ccsrc/RegExp.cc

@@ -20,7 +20,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: RegExp.cc,v 1.1 2003/06/12 15:12:19 rathnor Exp $ +// $Id: RegExp.cc,v 1.2 2003/06/13 11:43:46 fluxgen Exp $ #include "RegExp.hh"

@@ -81,10 +81,10 @@ }

#endif // USE_REGEXP } -bool RegExp::match(const std::string &str) { +bool RegExp::match(const std::string &str) const { #ifdef USE_REGEXP if (m_regex) - return (regexec(m_regex, str.c_str(), 0, 0, 0) == 0); + return regexec(m_regex, str.c_str(), 0, 0, 0) == 0; else return false; #else // notdef USE_REGEXP

@@ -92,3 +92,11 @@ return (m_str == str);

#endif // USE_REGEXP } + +bool RegExp::error() const { +#ifdef USE_REGEXP + return m_regex == 0; +#else + return return m_str == ""; +#endif // USE_REGEXP +}
M src/RegExp.hhsrc/RegExp.hh

@@ -21,12 +21,16 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: RegExp.hh,v 1.1 2003/06/12 15:12:19 rathnor Exp $ +// $Id: RegExp.hh,v 1.2 2003/06/13 11:43:46 fluxgen Exp $ #ifndef REGEXP_HH #define REGEXP_HH +#include "NotCopyable.hh" + +#ifdef HAVE_CONFIG_H #include "config.h" +#endif // HAVE_CONFIG_H #include <string>

@@ -41,18 +45,14 @@ #endif // USE_REGEXP

class WinClient; -class RegExp { +class RegExp:private FbTk::NotCopyable { public: RegExp(const std::string &str, bool full_match = true); ~RegExp(); - bool match(const std::string &str); + bool match(const std::string &str) const; -#ifdef USE_REGEXP - inline bool error() { return m_regex == 0; } -#else // notdef USE_REGEXP - inline bool error() { return m_str == ""; } -#endif // USE_REGEXP + bool error() const; private: #ifdef USE_REGEXP