From 730e5dde39333cb2f63c72a7d7152bee5c4dbb05 Mon Sep 17 00:00:00 2001 From: Ben Longbons Date: Sat, 8 Feb 2014 15:09:25 -0800 Subject: Implement AString --- src/io/lock.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/io/lock.cpp') diff --git a/src/io/lock.cpp b/src/io/lock.cpp index c7cbda8..96c3649 100644 --- a/src/io/lock.cpp +++ b/src/io/lock.cpp @@ -46,7 +46,7 @@ namespace io int no = getpid(); // Get a filename that doesn't already exist - FString newfile; + AString newfile; do { newfile = STRPRINTF("%s_%d.tmp", filename, no++); @@ -59,7 +59,7 @@ namespace io return fd; } - WriteLock::WriteLock(FString fn, bool linebuffered) + WriteLock::WriteLock(RString fn, bool linebuffered) : WriteFile(get_lock_open(fn, &tmp_suffix), linebuffered), filename(fn) {} WriteLock::~WriteLock() @@ -72,16 +72,16 @@ namespace io } int n = backup_count; - FString old_filename = STRPRINTF("%s.%d", filename, n); + AString old_filename = STRPRINTF("%s.%d", filename, n); while (--n) { - FString newer_filename = STRPRINTF("%s.%d", filename, n); + AString newer_filename = STRPRINTF("%s.%d", filename, n); rename(newer_filename.c_str(), old_filename.c_str()); old_filename = std::move(newer_filename); } rename(filename.c_str(), old_filename.c_str()); - FString tmpfile = STRPRINTF("%s_%d.tmp", filename, tmp_suffix); + AString tmpfile = STRPRINTF("%s_%d.tmp", filename, tmp_suffix); rename(tmpfile.c_str(), filename.c_str()); } } // namespace io -- cgit v1.2.3-70-g09d2