aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--otafault/ota_io.cpp2
-rw-r--r--otafault/ota_io.h2
-rw-r--r--screen_ui.cpp6
-rw-r--r--screen_ui.h6
-rw-r--r--verifier.cpp2
-rw-r--r--verifier.h4
6 files changed, 11 insertions, 11 deletions
diff --git a/otafault/ota_io.cpp b/otafault/ota_io.cpp
index f5b01136..3a89bb5d 100644
--- a/otafault/ota_io.cpp
+++ b/otafault/ota_io.cpp
@@ -89,7 +89,7 @@ static int __ota_fclose(FILE* fh) {
89 return fclose(fh); 89 return fclose(fh);
90} 90}
91 91
92void OtaFcloser::operator()(FILE* f) { 92void OtaFcloser::operator()(FILE* f) const {
93 __ota_fclose(f); 93 __ota_fclose(f);
94}; 94};
95 95
diff --git a/otafault/ota_io.h b/otafault/ota_io.h
index 395b4230..9428f1b1 100644
--- a/otafault/ota_io.h
+++ b/otafault/ota_io.h
@@ -59,7 +59,7 @@ using unique_fd = android::base::unique_fd_impl<OtaCloser>;
59int ota_close(unique_fd& fd); 59int ota_close(unique_fd& fd);
60 60
61struct OtaFcloser { 61struct OtaFcloser {
62 void operator()(FILE*); 62 void operator()(FILE*) const;
63}; 63};
64 64
65using unique_file = std::unique_ptr<FILE, OtaFcloser>; 65using unique_file = std::unique_ptr<FILE, OtaFcloser>;
diff --git a/screen_ui.cpp b/screen_ui.cpp
index 706877b4..bb2772dd 100644
--- a/screen_ui.cpp
+++ b/screen_ui.cpp
@@ -98,7 +98,7 @@ GRSurface* ScreenRecoveryUI::GetCurrentText() {
98 } 98 }
99} 99}
100 100
101int ScreenRecoveryUI::PixelsFromDp(int dp) { 101int ScreenRecoveryUI::PixelsFromDp(int dp) const {
102 return dp * density_; 102 return dp * density_;
103} 103}
104 104
@@ -256,12 +256,12 @@ void ScreenRecoveryUI::DrawHorizontalRule(int* y) {
256 *y += 4; 256 *y += 4;
257} 257}
258 258
259void ScreenRecoveryUI::DrawTextLine(int x, int* y, const char* line, bool bold) { 259void ScreenRecoveryUI::DrawTextLine(int x, int* y, const char* line, bool bold) const {
260 gr_text(gr_sys_font(), x, *y, line, bold); 260 gr_text(gr_sys_font(), x, *y, line, bold);
261 *y += char_height_ + 4; 261 *y += char_height_ + 4;
262} 262}
263 263
264void ScreenRecoveryUI::DrawTextLines(int x, int* y, const char* const* lines) { 264void ScreenRecoveryUI::DrawTextLines(int x, int* y, const char* const* lines) const {
265 for (size_t i = 0; lines != nullptr && lines[i] != nullptr; ++i) { 265 for (size_t i = 0; lines != nullptr && lines[i] != nullptr; ++i) {
266 DrawTextLine(x, y, lines[i], false); 266 DrawTextLine(x, y, lines[i], false);
267 } 267 }
diff --git a/screen_ui.h b/screen_ui.h
index b2dcf4ae..a2322c36 100644
--- a/screen_ui.h
+++ b/screen_ui.h
@@ -160,14 +160,14 @@ class ScreenRecoveryUI : public RecoveryUI {
160 void LoadBitmap(const char* filename, GRSurface** surface); 160 void LoadBitmap(const char* filename, GRSurface** surface);
161 void LoadLocalizedBitmap(const char* filename, GRSurface** surface); 161 void LoadLocalizedBitmap(const char* filename, GRSurface** surface);
162 162
163 int PixelsFromDp(int dp); 163 int PixelsFromDp(int dp) const;
164 virtual int GetAnimationBaseline(); 164 virtual int GetAnimationBaseline();
165 virtual int GetProgressBaseline(); 165 virtual int GetProgressBaseline();
166 virtual int GetTextBaseline(); 166 virtual int GetTextBaseline();
167 167
168 void DrawHorizontalRule(int* y); 168 void DrawHorizontalRule(int* y);
169 void DrawTextLine(int x, int* y, const char* line, bool bold); 169 void DrawTextLine(int x, int* y, const char* line, bool bold) const;
170 void DrawTextLines(int x, int* y, const char* const* lines); 170 void DrawTextLines(int x, int* y, const char* const* lines) const;
171}; 171};
172 172
173#endif // RECOVERY_UI_H 173#endif // RECOVERY_UI_H
diff --git a/verifier.cpp b/verifier.cpp
index 8be6da09..2ef9c4c3 100644
--- a/verifier.cpp
+++ b/verifier.cpp
@@ -376,7 +376,7 @@ std::unique_ptr<RSA, RSADeleter> parse_rsa_key(FILE* file, uint32_t exponent) {
376} 376}
377 377
378struct BNDeleter { 378struct BNDeleter {
379 void operator()(BIGNUM* bn) { 379 void operator()(BIGNUM* bn) const {
380 BN_free(bn); 380 BN_free(bn);
381 } 381 }
382}; 382};
diff --git a/verifier.h b/verifier.h
index 6bee7494..6fa8f2b0 100644
--- a/verifier.h
+++ b/verifier.h
@@ -26,13 +26,13 @@
26#include <openssl/sha.h> 26#include <openssl/sha.h>
27 27
28struct RSADeleter { 28struct RSADeleter {
29 void operator()(RSA* rsa) { 29 void operator()(RSA* rsa) const {
30 RSA_free(rsa); 30 RSA_free(rsa);
31 } 31 }
32}; 32};
33 33
34struct ECKEYDeleter { 34struct ECKEYDeleter {
35 void operator()(EC_KEY* ec_key) { 35 void operator()(EC_KEY* ec_key) const {
36 EC_KEY_free(ec_key); 36 EC_KEY_free(ec_key);
37 } 37 }
38}; 38};