summaryrefslogtreecommitdiff
path: root/library/db_file.cpp
diff options
context:
space:
mode:
authorDaniel Wilhelm <daniel@wili.li>2014-04-18 17:12:17 +0200
committerDaniel Wilhelm <daniel@wili.li>2014-04-18 17:12:17 +0200
commitb654dbfa5f3e4a4d02f72023f7c5895635aa6396 (patch)
tree8c1dfe7f638c0fc7afc1d08bc2fc0fd0f8646e5e /library/db_file.cpp
parent3.17 (diff)
downloadFreeFileSync-b654dbfa5f3e4a4d02f72023f7c5895635aa6396.tar.gz
FreeFileSync-b654dbfa5f3e4a4d02f72023f7c5895635aa6396.tar.bz2
FreeFileSync-b654dbfa5f3e4a4d02f72023f7c5895635aa6396.zip
3.18
Diffstat (limited to 'library/db_file.cpp')
-rw-r--r--library/db_file.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/library/db_file.cpp b/library/db_file.cpp
index 47e03b66..1d48dbdf 100644
--- a/library/db_file.cpp
+++ b/library/db_file.cpp
@@ -138,7 +138,7 @@ private:
namespace
{
typedef std::string UniqueId;
-typedef boost::shared_ptr<std::vector<char> > MemoryStreamPtr; //byte stream representing DirInformation
+typedef std::shared_ptr<std::vector<char> > MemoryStreamPtr; //byte stream representing DirInformation
typedef std::map<UniqueId, MemoryStreamPtr> DirectoryTOC; //list of streams ordered by a UUID pointing to their partner database
typedef std::pair<UniqueId, DirectoryTOC> DbStreamData; //header data: UUID representing this database, item data: list of dir-streams
}
@@ -233,11 +233,11 @@ std::pair<DirInfoPtr, DirInfoPtr> zen::loadFromDisk(const BaseDirMapping& baseMa
wxT("\"") + zToWx(fileNameRight) + wxT("\""));
//read streams into DirInfo
- boost::shared_ptr<DirInformation> dirInfoLeft(new DirInformation);
+ std::shared_ptr<DirInformation> dirInfoLeft(new DirInformation);
wxMemoryInputStream buffer(&(*dbLeft->second)[0], dbLeft->second->size()); //convert char-array to inputstream: no copying, ownership not transferred
ReadDirInfo(buffer, zToWx(fileNameLeft), *dirInfoLeft); //read file/dir information
- boost::shared_ptr<DirInformation> dirInfoRight(new DirInformation);
+ std::shared_ptr<DirInformation> dirInfoRight(new DirInformation);
wxMemoryInputStream buffer2(&(*dbRight->second)[0], dbRight->second->size()); //convert char-array to inputstream: no copying, ownership not transferred
ReadDirInfo(buffer2, zToWx(fileNameRight), *dirInfoRight); //read file/dir information
@@ -474,7 +474,7 @@ void zen::saveToDisk(const BaseDirMapping& baseMapping) //throw (FileError)
//(try to) read old DirInfo
- std::auto_ptr<DirInformation> oldDirInfoLeft;
+ std::shared_ptr<DirInformation> oldDirInfoLeft;
try
{
DirectoryTOC::const_iterator iter = dbEntriesLeft.second.find(dbEntriesRight.first);
@@ -483,14 +483,14 @@ void zen::saveToDisk(const BaseDirMapping& baseMapping) //throw (FileError)
{
const std::vector<char>& memStream = *iter->second;
wxMemoryInputStream buffer(&memStream[0], memStream.size()); //convert char-array to inputstream: no copying, ownership not transferred
- std::auto_ptr<DirInformation> dirInfoTmp(new DirInformation);
+ std::shared_ptr<DirInformation> dirInfoTmp = std::make_shared<DirInformation>();
ReadDirInfo(buffer, zToWx(baseMapping.getDBFilename<LEFT_SIDE>()), *dirInfoTmp); //read file/dir information
oldDirInfoLeft = dirInfoTmp;
}
}
catch(FileError&) {} //if error occurs: just overwrite old file! User is already informed about issues right after comparing!
- std::auto_ptr<DirInformation> oldDirInfoRight;
+ std::shared_ptr<DirInformation> oldDirInfoRight;
try
{
DirectoryTOC::const_iterator iter = dbEntriesRight.second.find(dbEntriesLeft.first);
@@ -499,7 +499,7 @@ void zen::saveToDisk(const BaseDirMapping& baseMapping) //throw (FileError)
{
const std::vector<char>& memStream = *iter->second;
wxMemoryInputStream buffer(&memStream[0], memStream.size()); //convert char-array to inputstream: no copying, ownership not transferred
- std::auto_ptr<DirInformation> dirInfoTmp(new DirInformation);
+ std::shared_ptr<DirInformation> dirInfoTmp = std::make_shared<DirInformation>();
ReadDirInfo(buffer, zToWx(baseMapping.getDBFilename<RIGHT_SIDE>()), *dirInfoTmp); //read file/dir information
oldDirInfoRight = dirInfoTmp;
}
bgstack15