add 2 constructors in CDiskBlockPos to simplify class usage

- add a default-constructor, which simply calls SetNull() and a
  constructor to directly pass nFile and nPos
- change code to use that new constructors
This commit is contained in:
Philip Kaufmann
2012-12-03 10:19:17 +01:00
parent cd7fb7d1de
commit a8a4b9673e
3 changed files with 13 additions and 10 deletions
+1 -3
View File
@@ -1535,9 +1535,7 @@ void static FlushBlockFile()
{
LOCK(cs_LastBlockFile);
CDiskBlockPos posOld;
posOld.nFile = nLastBlockFile;
posOld.nPos = 0;
CDiskBlockPos posOld(nLastBlockFile, 0);
FILE *fileOld = OpenBlockFile(posOld);
FileCommit(fileOld);