aboutsummaryrefslogtreecommitdiffstats
path: root/docs/miscellaneous.rst
diff options
context:
space:
mode:
authorDenton Liu <liu.denton+github@gmail.com>2016-08-27 01:28:44 +0800
committerDenton Liu <liu.denton+github@gmail.com>2016-08-27 01:28:44 +0800
commitd905f0e85bba5954ffe50a3f29ca68649130ea77 (patch)
tree8343e42b6ae51b8b33840e5836a1bff90c2d46aa /docs/miscellaneous.rst
parent2d834f723a12ae7b33dc4d1ebd35578b8b584b52 (diff)
downloaddexon-solidity-d905f0e85bba5954ffe50a3f29ca68649130ea77.tar.gz
dexon-solidity-d905f0e85bba5954ffe50a3f29ca68649130ea77.tar.zst
dexon-solidity-d905f0e85bba5954ffe50a3f29ca68649130ea77.zip
Write about struct members as well
Diffstat (limited to 'docs/miscellaneous.rst')
-rw-r--r--docs/miscellaneous.rst8
1 files changed, 4 insertions, 4 deletions
diff --git a/docs/miscellaneous.rst b/docs/miscellaneous.rst
index 69d4d310..8d1452b4 100644
--- a/docs/miscellaneous.rst
+++ b/docs/miscellaneous.rst
@@ -27,10 +27,10 @@ Statically-sized variables (everything except mapping and dynamically-sized arra
values, there is no inherent benefit because the compiler does not pack these values.
Finally, in order to allow the EVM to optimize for this, ensure that you try to order your
- storage variables such that they can be packed tightly. For example, declaring your storage
- variables in the order of ``uint128, uint128, uint256`` instead of ``uint128, uint256,
- uint128``, as the former will only take up two slots of storage whereas the latter will take up
- three.
+ storage variables and ``struct`` members such that they can be packed tightly. For example,
+ declaring your storage variables in the order of ``uint128, uint128, uint256`` instead of
+ ``uint128, uint256, uint128``, as the former will only take up two slots of storage whereas the
+ latter will take up three.
The elements of structs and arrays are stored after each other, just as if they were given explicitly.