From 04cca330944f859b4ed68cb8da8a79f5206fd630 Mon Sep 17 00:00:00 2001 From: Jim Posen Date: Thu, 24 Jan 2019 11:20:57 -0800 Subject: Style cleanup. --- src/flatfile.h | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'src/flatfile.h') diff --git a/src/flatfile.h b/src/flatfile.h index 6051970490..374ceff411 100644 --- a/src/flatfile.h +++ b/src/flatfile.h @@ -24,14 +24,12 @@ struct FlatFilePos READWRITE(VARINT(nPos)); } - FlatFilePos() { - SetNull(); - } + FlatFilePos() : nFile(-1), nPos(0) {} - FlatFilePos(int nFileIn, unsigned int nPosIn) { - nFile = nFileIn; - nPos = nPosIn; - } + FlatFilePos(int nFileIn, unsigned int nPosIn) : + nFile(nFileIn), + nPos(nPosIn) + {} friend bool operator==(const FlatFilePos &a, const FlatFilePos &b) { return (a.nFile == b.nFile && a.nPos == b.nPos); @@ -72,7 +70,7 @@ public: fs::path FileName(const FlatFilePos& pos) const; /** Open a handle to the file at the given position. */ - FILE* Open(const FlatFilePos& pos, bool fReadOnly = false); + FILE* Open(const FlatFilePos& pos, bool read_only = false); /** * Allocate additional space in a file after the given starting position. The amount allocated -- cgit v1.2.3