From 9c0272004e2509a2206d94dfbe30bb035c8c6d67 Mon Sep 17 00:00:00 2001 From: fluxgen Date: Wed, 21 Jan 2004 13:36:09 +0000 Subject: using empty instead of size --- src/SystemTray.cc | 6 +++--- src/Toolbar.cc | 4 ++-- src/fluxbox.cc | 25 ++++++++++++------------- 3 files changed, 17 insertions(+), 18 deletions(-) diff --git a/src/SystemTray.cc b/src/SystemTray.cc index 781d784..1a69a48 100644 --- a/src/SystemTray.cc +++ b/src/SystemTray.cc @@ -19,7 +19,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: SystemTray.cc,v 1.5 2004/01/19 18:22:57 fluxgen Exp $ +// $Id: SystemTray.cc,v 1.6 2004/01/21 13:35:10 fluxgen Exp $ #include "SystemTray.hh" @@ -215,7 +215,7 @@ void SystemTray::addClient(Window win) { #ifdef DEBUG cerr<<__FILE__<<"("<<__FUNCTION__<<"): 0x"<isScreenManaged()) { @@ -563,7 +562,7 @@ Fluxbox::Fluxbox(int argc, char **argv, const char *dpy_name, const char *rcfile m_keyscreen = m_mousescreen = m_screen_list.front(); - if (m_screen_list.size() == 0) { + if (m_screen_list.empty()) { //!! TODO: NLS throw string("Couldn't find screens to manage.\n" "Make sure you don't have another window manager running."); @@ -1544,7 +1543,7 @@ void Fluxbox::save_rc() { string dbfile(getRcFilename()); - if (dbfile.size() != 0) { + if (!dbfile.empty()) { m_resourcemanager.save(dbfile.c_str(), dbfile.c_str()); m_screen_rm.save(dbfile.c_str(), dbfile.c_str()); } else @@ -1593,7 +1592,7 @@ void Fluxbox::save_rc() { /// @return filename of resource file string Fluxbox::getRcFilename() { - if (m_rc_file.size() == 0) { // set default filename + if (m_rc_file.empty()) { // set default filename string defaultfile(getenv("HOME") + string("/.") + m_RC_PATH + string("/") + m_RC_INIT_FILE); return defaultfile; } @@ -1612,7 +1611,7 @@ void Fluxbox::load_rc() { //get resource filename string dbfile(getRcFilename()); - if (dbfile.size() != 0) { + if (!dbfile.empty()) { if (!m_resourcemanager.load(dbfile.c_str())) { cerr<<"Failed to load database:"<size() == 0) + if (m_rc_menufile->empty()) m_rc_menufile.setDefaultValue(); - if (m_rc_slitlistfile->size() != 0) { + if (!m_rc_slitlistfile->empty()) { *m_rc_slitlistfile = StringUtil::expandFilename(*m_rc_slitlistfile); } else { string filename; @@ -1640,7 +1639,7 @@ void Fluxbox::load_rc() { else if (*m_rc_colors_per_channel > 6) *m_rc_colors_per_channel = 6; - if (m_rc_stylefile->size() == 0) + if (m_rc_stylefile->empty()) *m_rc_stylefile = DEFAULTSTYLE; else // expand tilde *m_rc_stylefile = StringUtil::expandFilename(*m_rc_stylefile); @@ -1711,7 +1710,7 @@ void Fluxbox::load_rc(BScreen &screen) { FbTk::Image::addSearchPath(paths[i]); } - if (dbfile.size() != 0) { + if (!dbfile.empty()) { if (!m_screen_rm.load(dbfile.c_str())) { cerr<<"Failed to load database:"<updateNetizenWindowFocus(); - for (int i=0; i < m_atomhandler.size(); ++i) { + for (size_t i=0; i < m_atomhandler.size(); ++i) { m_atomhandler[i]->updateFocusedWindow(*screen, (m_focused_window ? m_focused_window->window() : @@ -1958,7 +1957,7 @@ void Fluxbox::setFocusedWindow(WinClient *client) { if (old_screen && old_screen != screen) { old_screen->updateNetizenWindowFocus(); - for (int i=0; i < m_atomhandler.size(); ++i) + for (size_t i=0; i < m_atomhandler.size(); ++i) m_atomhandler[i]->updateFocusedWindow(*old_screen, 0); } -- cgit v0.11.2