summaryrefslogtreecommitdiffstats
path: root/CodingStyle
diff options
context:
space:
mode:
authorSage Weil <sage@redhat.com>2018-05-24 21:03:49 +0200
committerSage Weil <sage@redhat.com>2018-05-24 21:03:49 +0200
commitffce49f96aca30935ade2daf26703714617a7f56 (patch)
tree6d7fbaaf498901276d0402ce2e80a25278074e46 /CodingStyle
parentCodingStyle: allow #pragma once (diff)
downloadceph-ffce49f96aca30935ade2daf26703714617a7f56.tar.xz
ceph-ffce49f96aca30935ade2daf26703714617a7f56.zip
CodingStyle: update my_type_t sample
Signed-off-by: Sage Weil <sage@redhat.com>
Diffstat (limited to 'CodingStyle')
-rw-r--r--CodingStyle5
1 files changed, 3 insertions, 2 deletions
diff --git a/CodingStyle b/CodingStyle
index 7e9621e27e8..1dc97eb1ffa 100644
--- a/CodingStyle
+++ b/CodingStyle
@@ -32,8 +32,9 @@ by section.
Yes, _t also means typedef. It's perhaps not ideal.
struct my_type_t {
- int a, b;
- my_type_t() : a(0), b(0) {}
+ int a = 0, b = 0;
+ void encode(...) ...
+ ...
};
- for full-blown classes, CamelCaps, private: section, accessors,