diff options
| author | Felix Morgner <felix.morgner@gmail.com> | 2016-12-25 00:48:15 +0100 |
|---|---|---|
| committer | Felix Morgner <felix.morgner@gmail.com> | 2016-12-25 00:49:17 +0100 |
| commit | 7bd8cc53fc013aed452ae12f0405242f35c0860c (patch) | |
| tree | 53563bac482328fa54007d5941a2cc7161391f3d /include/fs | |
| parent | 36361d1f7443662bfb9b5c566c9d73053c23fcf0 (diff) | |
| download | extfs-7bd8cc53fc013aed452ae12f0405242f35c0860c.tar.xz extfs-7bd8cc53fc013aed452ae12f0405242f35c0860c.zip | |
extfs: Swap order of member variables
Since we know that sizeof(extfs_superblock) is guaranteed to be 1024,
we should move it to the begining of the data member list. Since 1024
is a power of two, we can be pretty certain, that no padding will be
inserted after fs::extfs::m_primarySuperblock. std::fstream however
makes no guarantees as to what it size is. Thus we would risk the
insertion of padding.
Diffstat (limited to 'include/fs')
| -rw-r--r-- | include/fs/extfs.hpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/fs/extfs.hpp b/include/fs/extfs.hpp index fb8f044..545a840 100644 --- a/include/fs/extfs.hpp +++ b/include/fs/extfs.hpp @@ -78,8 +78,8 @@ namespace fs bool has_label() const; private: - std::fstream m_stream{}; detail::extfs_superblock m_primarySuperblock{}; + std::fstream m_stream{}; }; } |
