From 4a7d0b8434e20d306a670d87cdec8cfe6fd308c5 Mon Sep 17 00:00:00 2001 From: mathias Date: Thu, 10 Feb 2005 10:24:31 +0000 Subject: cosmetic + updated copyright year --- src/ClientPattern.cc | 2 +- src/CommandParser.cc | 26 +++++++++----------------- src/FbTk/StringUtil.hh | 2 +- src/Keys.cc | 2 +- 4 files changed, 12 insertions(+), 20 deletions(-) diff --git a/src/ClientPattern.cc b/src/ClientPattern.cc index 93f0000..fd9ab9d 100644 --- a/src/ClientPattern.cc +++ b/src/ClientPattern.cc @@ -24,8 +24,8 @@ #include "ClientPattern.hh" #include "RegExp.hh" -#include "StringUtil.hh" #include "WinClient.hh" +#include "FbTk/StringUtil.hh" #include "FbTk/App.hh" // use GNU extensions diff --git a/src/CommandParser.cc b/src/CommandParser.cc index 582fa44..d4c6a28 100644 --- a/src/CommandParser.cc +++ b/src/CommandParser.cc @@ -23,22 +23,14 @@ // $Id$ #include "CommandParser.hh" - -#include "StringUtil.hh" +#include "FbTk/StringUtil.hh" #include -using namespace std; - -namespace { - -string::size_type removeFirstWhitespace(std::string &str) { - string::size_type first_pos = str.find_first_not_of(" \t"); - if (first_pos != string::npos) - str.erase(0, first_pos); - return first_pos; -} -}; // end anonymous namespace +using std::string; +using std::vector; +using FbTk::StringUtil::removeFirstWhitespace; +using FbTk::StringUtil::toLower; CommandFactory::CommandFactory() { @@ -49,7 +41,7 @@ CommandFactory::~CommandFactory() { CommandParser::instance().removeAssociation(*this); } -void CommandFactory::addCommand(const std::string &command_name) { +void CommandFactory::addCommand(const string &command_name) { CommandParser::instance().associateCommand(command_name, *this); } @@ -58,7 +50,7 @@ CommandParser &CommandParser::instance() { return singleton; } -FbTk::Command *CommandParser::parseLine(const std::string &line) { +FbTk::Command *CommandParser::parseLine(const string &line) { // parse arguments and command string command = line; @@ -74,7 +66,7 @@ FbTk::Command *CommandParser::parseLine(const std::string &line) { // now we have parsed command and arguments - command = FbTk::StringUtil::toLower(command); + command = toLower(command); // we didn't find any matching command in default commands, // so we search in the command creators modules for a @@ -100,7 +92,7 @@ void CommandParser::associateCommand(const std::string &command, CommandFactory void CommandParser::removeAssociation(CommandFactory &factory) { // commands that are associated with the factory - std::vector commands; + vector commands; // find associations CommandFactoryMap::iterator factory_it = m_commandfactorys.begin(); const CommandFactoryMap::iterator factory_it_end = m_commandfactorys.end(); diff --git a/src/FbTk/StringUtil.hh b/src/FbTk/StringUtil.hh index 2b0a930..3112a9d 100644 --- a/src/FbTk/StringUtil.hh +++ b/src/FbTk/StringUtil.hh @@ -1,5 +1,5 @@ // StringUtil.hh for fluxbox -// Copyright (c) 2001 - 2004 Henrik Kinnunen (fluxgen at fluxbox dot org) +// Copyright (c) 2001 - 2005 Henrik Kinnunen (fluxgen at fluxbox dot org) // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the "Software"), diff --git a/src/Keys.cc b/src/Keys.cc index e3e47cb..96f57cb 100644 --- a/src/Keys.cc +++ b/src/Keys.cc @@ -1,5 +1,5 @@ // Keys.cc for Fluxbox - an X11 Window manager -// Copyright (c) 2001 - 2003 Henrik Kinnunen (fluxgen at fluxbox dot org) +// Copyright (c) 2001 - 2005 Henrik Kinnunen (fluxgen at fluxbox dot org) // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the "Software"), -- cgit v0.11.2