wsd/README | 11 +++++++++++ 1 file changed, 11 insertions(+) New commits: commit 35ccd70681ea3220ec33a19efa41575c4df8bcb2 Author: Miklos Vajna <vmik...@collabora.co.uk> Date: Wed Feb 7 14:58:23 2018 +0100
wsd: document when to use 'auto' Change-Id: I376c8d159bc8e087315de29fd3289b45b36d4b76 Reviewed-on: https://gerrit.libreoffice.org/49356 Reviewed-by: Jan Holesovsky <ke...@collabora.com> Tested-by: Jan Holesovsky <ke...@collabora.com> diff --git a/wsd/README b/wsd/README index c696a42c..cb52706f 100644 --- a/wsd/README +++ b/wsd/README @@ -391,3 +391,14 @@ The style is roughly as follows, in rough order of importance: - return - is not a function; but a statement - it doesn't need extra () +- Use 'auto' in the following cases only: + + - iterators + + - range-based for loops + + - the type is spelled out in the same line already (e.g. initializing from a + cast or a function that has a single type parameter) + + In other cases it makes the code more readable to still spell out the type + explicitly. _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits