Fix InfiniTime compiler warnings

This commit is contained in:
Riku Isokoski 2022-06-14 09:48:00 +03:00 committed by Avamander
parent 95ff285991
commit 2b2aefcf6a
3 changed files with 8 additions and 15 deletions

View File

@ -9,15 +9,15 @@ using namespace Pinetime;
uint32_t BootloaderVersion::version = 0;
char BootloaderVersion::versionString[BootloaderVersion::VERSION_STR_LEN] = "0.0.0";
const uint32_t BootloaderVersion::Major() {
uint32_t BootloaderVersion::Major() {
return (BootloaderVersion::version >> 16u) & 0xff;
}
const uint32_t BootloaderVersion::Minor() {
uint32_t BootloaderVersion::Minor() {
return (BootloaderVersion::version >> 8u) & 0xff;
}
const uint32_t BootloaderVersion::Patch() {
uint32_t BootloaderVersion::Patch() {
return BootloaderVersion::version & 0xff;
}
@ -25,7 +25,7 @@ const char* BootloaderVersion::VersionString() {
return BootloaderVersion::versionString;
}
const bool BootloaderVersion::IsValid() {
bool BootloaderVersion::IsValid() {
return BootloaderVersion::version >= 0x00010000;
}

View File

@ -6,11 +6,11 @@
namespace Pinetime {
class BootloaderVersion {
public:
static const uint32_t Major();
static const uint32_t Minor();
static const uint32_t Patch();
static uint32_t Major();
static uint32_t Minor();
static uint32_t Patch();
static const char* VersionString();
static const bool IsValid();
static bool IsValid();
static void SetVersion(uint32_t v);
private:

View File

@ -42,13 +42,6 @@ namespace {
auto* screen = static_cast<WatchFacePineTimeStyle*>(obj->user_data);
screen->UpdateSelected(obj, event);
}
bool IsBleIconVisible(bool isRadioEnabled, bool isConnected) {
if (!isRadioEnabled) {
return true;
}
return isConnected;
}
}
WatchFacePineTimeStyle::WatchFacePineTimeStyle(DisplayApp* app,