commit | 0e9d5fabc8e2cdddcb99409046abbeb3c223194c | [log] [tgz] |
---|---|---|
author | Jonathan Basseri <misterikkit@google.com> | Tue Aug 22 11:39:17 2017 -0700 |
committer | Jonathan Basseri <misterikkit@google.com> | Tue Aug 22 11:39:17 2017 -0700 |
tree | 6c5030f38b1631bfe3eacabede2028c293106afa | |
parent | 774f006bd19608ef70cb96f2d359440e7987b31c [diff] [blame] |
Prevent accidental conversion from int to Status. Test: compilation Change-Id: I28c2eaa25b90d835b47dc7596abc5b613f18bf30
diff --git a/libnetdutils/include/netdutils/Status.h b/libnetdutils/include/netdutils/Status.h index f0ce58a..302da96 100644 --- a/libnetdutils/include/netdutils/Status.h +++ b/libnetdutils/include/netdutils/Status.h
@@ -31,7 +31,7 @@ public: Status() = default; - Status(int code) : mCode(code) {} + explicit Status(int code) : mCode(code) {} Status(int code, const std::string& msg) : mCode(code), mMsg(msg) { assert(!ok()); }