Commit 41f94bf3 authored by Ivan Pizhenko's avatar Ivan Pizhenko Committed by Adam Cozzette

Fix GetErrno() to be const (#5595)

* Fix GetErrno() to be const noexcept

* Removed noexcept
parent a21caa23
...@@ -86,7 +86,7 @@ class PROTOBUF_EXPORT FileInputStream : public ZeroCopyInputStream { ...@@ -86,7 +86,7 @@ class PROTOBUF_EXPORT FileInputStream : public ZeroCopyInputStream {
// errno from that error. Otherwise, this is zero. Once an error // errno from that error. Otherwise, this is zero. Once an error
// occurs, the stream is broken and all subsequent operations will // occurs, the stream is broken and all subsequent operations will
// fail. // fail.
int GetErrno() { return copying_input_.GetErrno(); } int GetErrno() const { return copying_input_.GetErrno(); }
// implements ZeroCopyInputStream ---------------------------------- // implements ZeroCopyInputStream ----------------------------------
bool Next(const void** data, int* size) override; bool Next(const void** data, int* size) override;
...@@ -102,7 +102,7 @@ class PROTOBUF_EXPORT FileInputStream : public ZeroCopyInputStream { ...@@ -102,7 +102,7 @@ class PROTOBUF_EXPORT FileInputStream : public ZeroCopyInputStream {
bool Close(); bool Close();
void SetCloseOnDelete(bool value) { close_on_delete_ = value; } void SetCloseOnDelete(bool value) { close_on_delete_ = value; }
int GetErrno() { return errno_; } int GetErrno() const { return errno_; }
// implements CopyingInputStream --------------------------------- // implements CopyingInputStream ---------------------------------
int Read(void* buffer, int size) override; int Read(void* buffer, int size) override;
...@@ -169,7 +169,7 @@ class PROTOBUF_EXPORT FileOutputStream : public ZeroCopyOutputStream { ...@@ -169,7 +169,7 @@ class PROTOBUF_EXPORT FileOutputStream : public ZeroCopyOutputStream {
// errno from that error. Otherwise, this is zero. Once an error // errno from that error. Otherwise, this is zero. Once an error
// occurs, the stream is broken and all subsequent operations will // occurs, the stream is broken and all subsequent operations will
// fail. // fail.
int GetErrno() { return copying_output_.GetErrno(); } int GetErrno() const { return copying_output_.GetErrno(); }
// implements ZeroCopyOutputStream --------------------------------- // implements ZeroCopyOutputStream ---------------------------------
bool Next(void** data, int* size) override; bool Next(void** data, int* size) override;
...@@ -184,7 +184,7 @@ class PROTOBUF_EXPORT FileOutputStream : public ZeroCopyOutputStream { ...@@ -184,7 +184,7 @@ class PROTOBUF_EXPORT FileOutputStream : public ZeroCopyOutputStream {
bool Close(); bool Close();
void SetCloseOnDelete(bool value) { close_on_delete_ = value; } void SetCloseOnDelete(bool value) { close_on_delete_ = value; }
int GetErrno() { return errno_; } int GetErrno() const { return errno_; }
// implements CopyingOutputStream -------------------------------- // implements CopyingOutputStream --------------------------------
bool Write(const void* buffer, int size) override; bool Write(const void* buffer, int size) override;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment