summaryrefslogtreecommitdiff
path: root/src/File.cc
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2008-05-13 14:15:23 +0000
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2008-05-13 14:15:23 +0000
commit386d19693bc3b06bea14f8fa606f513b6fe1ac9d (patch)
tree0137a837f6ce609ac1319b859a5333e0753f7527 /src/File.cc
parent9d03f0d2f747c7c66a64081a7cabcf4e02c11020 (diff)
2008-05-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Replaced "" with static const variable A2STR::NIL. Replaced string comparison against "" with std::string::empty(). Added PROTO_* to Request class and use them as a protocol string constant. Made "started", "stopped", "completed" static const variable in AnnounceList class.
Diffstat (limited to 'src/File.cc')
-rw-r--r--src/File.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/File.cc b/src/File.cc
index 7d13b035..afe49bbc 100644
--- a/src/File.cc
+++ b/src/File.cc
@@ -34,6 +34,7 @@
/* copyright --> */
#include "File.h"
#include "Util.h"
+#include "A2STR.h"
#include <cstring>
#include <stdlib.h>
#include <deque>
@@ -142,8 +143,8 @@ std::string File::getDirname() const
{
std::string::size_type lastSlashIndex = name.find_last_of("/");
if(lastSlashIndex == std::string::npos) {
- if(name == "") {
- return "";
+ if(name.empty()) {
+ return A2STR::NIL;
} else {
return ".";
}