From b49767c0bacb714e14f988423e14832689c6faf2 Mon Sep 17 00:00:00 2001 From: Mikhail Lappo Date: Thu, 23 Mar 2017 21:44:26 +0100 Subject: Const modifiers This functions do not change class variables Would be good to mark them as const, so class variables are not changed by coincidence Change-Id: Iea34f6d26dbd1bde813035160e07ff2a681989e6 --- otafault/ota_io.cpp | 2 +- otafault/ota_io.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'otafault') diff --git a/otafault/ota_io.cpp b/otafault/ota_io.cpp index f5b01136f..3a89bb5dd 100644 --- a/otafault/ota_io.cpp +++ b/otafault/ota_io.cpp @@ -89,7 +89,7 @@ static int __ota_fclose(FILE* fh) { return fclose(fh); } -void OtaFcloser::operator()(FILE* f) { +void OtaFcloser::operator()(FILE* f) const { __ota_fclose(f); }; diff --git a/otafault/ota_io.h b/otafault/ota_io.h index 395b4230e..9428f1b1f 100644 --- a/otafault/ota_io.h +++ b/otafault/ota_io.h @@ -59,7 +59,7 @@ using unique_fd = android::base::unique_fd_impl; int ota_close(unique_fd& fd); struct OtaFcloser { - void operator()(FILE*); + void operator()(FILE*) const; }; using unique_file = std::unique_ptr; -- cgit v1.2.3