summaryrefslogtreecommitdiff
path: root/ftparchive/cachedb.cc
diff options
context:
space:
mode:
authorDavid Kalnischkies <kalnischkies@gmail.com>2011-09-19 13:31:29 +0200
committerDavid Kalnischkies <kalnischkies@gmail.com>2011-09-19 13:31:29 +0200
commit8f3ba4e8708cb72be19dacc2af4f601ee5fea292 (patch)
treef624675aa3d4add287f253e19eb28c0dce5669f1 /ftparchive/cachedb.cc
parentc333ea435b67d7d7d7d10e867298ecac4da0f7b8 (diff)
do not pollute namespace in the headers with using (Closes: #500198)
Diffstat (limited to 'ftparchive/cachedb.cc')
-rw-r--r--ftparchive/cachedb.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/ftparchive/cachedb.cc b/ftparchive/cachedb.cc
index a1d70f912..7d8718c56 100644
--- a/ftparchive/cachedb.cc
+++ b/ftparchive/cachedb.cc
@@ -28,7 +28,7 @@
// CacheDB::ReadyDB - Ready the DB2 /*{{{*/
// ---------------------------------------------------------------------
/* This opens the DB2 file for caching package information */
-bool CacheDB::ReadyDB(string const &DB)
+bool CacheDB::ReadyDB(std::string const &DB)
{
int err;
@@ -48,7 +48,7 @@ bool CacheDB::ReadyDB(string const &DB)
DBLoaded = false;
Dbp = 0;
- DBFile = string();
+ DBFile = std::string();
if (DB.empty())
return true;
@@ -162,7 +162,7 @@ bool CacheDB::GetCurStat()
/*}}}*/
// CacheDB::GetFileInfo - Get all the info about the file /*{{{*/
// ---------------------------------------------------------------------
-bool CacheDB::GetFileInfo(string const &FileName, bool const &DoControl, bool const &DoContents,
+bool CacheDB::GetFileInfo(std::string const &FileName, bool const &DoControl, bool const &DoContents,
bool const &GenContentsOnly, bool const &DoMD5, bool const &DoSHA1,
bool const &DoSHA256, bool const &DoSHA512,
bool const &checkMtime)
@@ -298,12 +298,12 @@ bool CacheDB::LoadContents(bool const &GenOnly)
}
/*}}}*/
-static string bytes2hex(uint8_t *bytes, size_t length) {
+static std::string bytes2hex(uint8_t *bytes, size_t length) {
char space[65];
if (length * 2 > sizeof(space) - 1) length = (sizeof(space) - 1) / 2;
for (size_t i = 0; i < length; i++)
snprintf(&space[i*2], 3, "%02x", bytes[i]);
- return string(space);
+ return std::string(space);
}
static inline unsigned char xdig2num(char const &dig) {
@@ -496,7 +496,7 @@ bool CacheDB::Clean()
stringcmp(Colon + 1, (char *)Key.data+Key.size,"cl") == 0 ||
stringcmp(Colon + 1, (char *)Key.data+Key.size,"cn") == 0)
{
- if (FileExists(string((const char *)Key.data,Colon)) == true)
+ if (FileExists(std::string((const char *)Key.data,Colon)) == true)
continue;
}
}