Merge pull request #8 from freddierice/master

swapped order of members in class to calm down the compiler
This commit is contained in:
mandreyel 2018-07-27 14:23:54 +02:00 committed by GitHub
commit 873ff4d585
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -73,6 +73,12 @@ private:
// Points to the first requested byte, and not to the actual start of the mapping. // Points to the first requested byte, and not to the actual start of the mapping.
pointer data_ = nullptr; pointer data_ = nullptr;
// Length, in bytes, requested by user, which may not be the length of the full
// mapping, and the entire length of the full mapping.
size_type length_ = 0;
size_type mapped_length_ = 0;
// Letting user map a file using both an existing file handle and a path introcudes
// On POSIX, we only need a file handle to create a mapping, while on Windows // On POSIX, we only need a file handle to create a mapping, while on Windows
// systems the file handle is necessary to retrieve a file mapping handle, but any // systems the file handle is necessary to retrieve a file mapping handle, but any
// subsequent operations on the mapped region must be done through the latter. // subsequent operations on the mapped region must be done through the latter.
@ -81,12 +87,6 @@ private:
handle_type file_mapping_handle_ = INVALID_HANDLE_VALUE; handle_type file_mapping_handle_ = INVALID_HANDLE_VALUE;
#endif #endif
// Length, in bytes, requested by user, which may not be the length of the full
// mapping, and the entire length of the full mapping.
size_type length_ = 0;
size_type mapped_length_ = 0;
// Letting user map a file using both an existing file handle and a path introcudes
// some complexity in that we must not close the file handle if user provided it, // some complexity in that we must not close the file handle if user provided it,
// but we must close it if we obtained it using the provided path. For this reason, // but we must close it if we obtained it using the provided path. For this reason,
// this flag is used to determine when to close file_handle_. // this flag is used to determine when to close file_handle_.