aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk/AutoReloadHelper.cc
diff options
context:
space:
mode:
authorMathias Gumz <akira at fluxbox dot org>2008-08-14 05:53:38 (GMT)
committerMathias Gumz <akira at fluxbox dot org>2008-08-14 05:53:38 (GMT)
commit31b47e78147ca20803b123f392bfd2002b70e052 (patch)
treef7beb9baa9daf86d66358fd834cafae14de7c782 /src/FbTk/AutoReloadHelper.cc
parente169d33552c8e7070aa6e13da0187f2013b4cfc3 (diff)
downloadfluxbox-31b47e78147ca20803b123f392bfd2002b70e052.zip
fluxbox-31b47e78147ca20803b123f392bfd2002b70e052.tar.bz2
cleanup of some files
Diffstat (limited to 'src/FbTk/AutoReloadHelper.cc')
-rw-r--r--src/FbTk/AutoReloadHelper.cc14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/FbTk/AutoReloadHelper.cc b/src/FbTk/AutoReloadHelper.cc
index e3c1d59..17124d4 100644
--- a/src/FbTk/AutoReloadHelper.cc
+++ b/src/FbTk/AutoReloadHelper.cc
@@ -40,19 +40,19 @@ void AutoReloadHelper::checkReload() {
40 } 40 }
41} 41}
42 42
43void AutoReloadHelper::setMainFile(std::string file) { 43void AutoReloadHelper::setMainFile(const std::string& file) {
44 file = StringUtil::expandFilename(file); 44 std::string expanded_file = StringUtil::expandFilename(file);
45 if (file == m_main_file) 45 if (expanded_file == m_main_file)
46 return; 46 return;
47 m_main_file = file; 47 m_main_file = expanded_file;
48 reload(); 48 reload();
49} 49}
50 50
51void AutoReloadHelper::addFile(std::string file) { 51void AutoReloadHelper::addFile(const std::string& file) {
52 if (file.empty()) 52 if (file.empty())
53 return; 53 return;
54 file = StringUtil::expandFilename(file); 54 std::string expanded_file = StringUtil::expandFilename(file);
55 m_timestamps[file] = FileUtil::getLastStatusChangeTimestamp(file.c_str()); 55 m_timestamps[expanded_file] = FileUtil::getLastStatusChangeTimestamp(expanded_file.c_str());
56} 56}
57 57
58void AutoReloadHelper::reload() { 58void AutoReloadHelper::reload() {