diff options
author | A. Unique TensorFlower <gardener@tensorflow.org> | 2018-05-01 16:33:03 -0700 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2018-05-01 16:35:52 -0700 |
commit | f5dbc1e16622f433f41f195bb33f56d674a004ce (patch) | |
tree | 8a08ec5c43192415056e0695337dd26e61256fcb /tensorflow/contrib/lite/toco/toco_port.h | |
parent | fb8f040f2a927c6df149238da7c4278cf781d081 (diff) |
Check for overflow in shape calculation.
PiperOrigin-RevId: 195017114
Diffstat (limited to 'tensorflow/contrib/lite/toco/toco_port.h')
-rw-r--r-- | tensorflow/contrib/lite/toco/toco_port.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tensorflow/contrib/lite/toco/toco_port.h b/tensorflow/contrib/lite/toco/toco_port.h index 2d5c231bef..906792ef56 100644 --- a/tensorflow/contrib/lite/toco/toco_port.h +++ b/tensorflow/contrib/lite/toco/toco_port.h @@ -38,10 +38,15 @@ namespace port { class Status { public: + static Status OK() { return Status(true, ""); } + + // Create a failed status with no message. Status() {} Status(bool ok, const string& message) : ok_(ok), message_(message) {} + void AppendMessage(const string& message) { message_ += message; } + bool ok() const { return ok_; } const string error_message() const { return message_; } |