all repos — fluxbox @ 4d161094576b29ca1a41e807fabb80d672fc1852

custom fork of the fluxbox windowmanager

removing trailing whitespace in filename
fluxgen fluxgen
commit

4d161094576b29ca1a41e807fabb80d672fc1852

parent

e8082ed519a3294d934029d0e478e31d8414ee97

1 files changed, 5 insertions(+), 11 deletions(-)

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

@@ -22,7 +22,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: Workspace.cc,v 1.82 2003/10/06 06:22:43 rathnor Exp $ +// $Id: Workspace.cc,v 1.83 2003/10/25 22:10:43 fluxgen Exp $ #include "Workspace.hh"

@@ -30,11 +30,12 @@ #include "I18n.hh"

#include "fluxbox.hh" #include "Screen.hh" #include "Window.hh" -#include "StringUtil.hh" -#include "SimpleCommand.hh" #include "WinClient.hh" #include "FbWinFrame.hh" #include "MenuItem.hh" + +#include "FbTk/StringUtil.hh" +#include "FbTk/SimpleCommand.hh" // use GNU extensions #ifndef _GNU_SOURCE

@@ -358,14 +359,7 @@ }

bool Workspace::loadGroups(const std::string &filename) { string real_filename = filename; - // strip trailing whitespace - string::size_type first_pos = real_filename.find_first_not_of(" \t"); - if (first_pos != string::npos) { - string::size_type last_pos = real_filename.find_first_of(" \t", last_pos); - if (last_pos != string::npos) - real_filename.erase(last_pos); - } - + FbTk::StringUtil::removeTrailingWhitespace(real_filename); ifstream infile(real_filename.c_str()); if (!infile) return false;