aboutsummaryrefslogtreecommitdiff
path: root/pw_protobuf
diff options
context:
space:
mode:
Diffstat (limited to 'pw_protobuf')
-rw-r--r--pw_protobuf/py/pw_protobuf/codegen_pwpb.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/pw_protobuf/py/pw_protobuf/codegen_pwpb.py b/pw_protobuf/py/pw_protobuf/codegen_pwpb.py
index 3cfebb03b..78d729582 100644
--- a/pw_protobuf/py/pw_protobuf/codegen_pwpb.py
+++ b/pw_protobuf/py/pw_protobuf/codegen_pwpb.py
@@ -2108,6 +2108,8 @@ def generate_struct_for_message(message: ProtoMessage, root: ProtoNode,
output.write_line('static_cast<void>(other);')
output.write_line('return true;')
output.write_line('}')
+ output.write_line('bool operator!=(const Message& other) const '
+ '{ return !(*this == other); }')
output.write_line('};')