diff --git a/Library/MemLogLibDefault/MemLogLib.c b/Library/MemLogLibDefault/MemLogLib.c index 871831bed..80eb706bf 100644 --- a/Library/MemLogLibDefault/MemLogLib.c +++ b/Library/MemLogLibDefault/MemLogLib.c @@ -273,7 +273,11 @@ MemLogVA ( // Add log to buffer // LastMessage = mMemLog->Cursor; +#ifdef JIEF_DEBUG + if (0) { +#else if (Timing) { +#endif // // Write timing only at the beginning of a new line // @@ -532,7 +536,11 @@ MemLogfVA ( // UINTN LastMessage = mMemLog->Cursor - mMemLog->Buffer; +#ifdef JIEF_DEBUG + vprintf_with_callback_timestamp_emitcr(Format, Marker, transmitS8Printf, NULL, &printfNewline, 0, 1); +#else vprintf_with_callback_timestamp_emitcr(Format, Marker, transmitS8Printf, NULL, &printfNewline, Timing, 1); +#endif size_t DataWritten = mMemLog->Cursor - mMemLog->Buffer - LastMessage; // diff --git a/rEFIt_UEFI/Platform/SelfOem.h b/rEFIt_UEFI/Platform/SelfOem.h index d8bebe497..385b97df2 100644 --- a/rEFIt_UEFI/Platform/SelfOem.h +++ b/rEFIt_UEFI/Platform/SelfOem.h @@ -14,20 +14,20 @@ class SelfOem { protected: - XString8 m_ConfName; + XString8 m_ConfName = NullXString8; // Initialisation required by -Weffc++. Couldn't use default ctor. // bool m_OemDirExists; EFI_FILE* m_OemDir = NULL; - XStringW m_OemPathRelToSelfDir; - XStringW m_OemFulPath; + XStringW m_OemPathRelToSelfDir = NullXStringW; + XStringW m_OemFulPath = NullXStringW; // const EFI_FILE* m_userConfigDir = NULL; - XStringW m_configDirPathRelToSelfDir; // could also be empty if config dir is clover dir. - XStringW m_configDirPathRelToSelfDirWithTrailingSlash; // could also be empty if config dir is clover dir. + XStringW m_configDirPathRelToSelfDir = NullXStringW; // could also be empty if config dir is clover dir. + XStringW m_configDirPathRelToSelfDirWithTrailingSlash = NullXStringW; // could also be empty if config dir is clover dir. EFI_FILE* m_KextsDir = NULL; - XStringW m_KextsPathRelToSelfDir; - XStringW m_KextsFullPath; + XStringW m_KextsPathRelToSelfDir = NullXStringW; + XStringW m_KextsFullPath = NullXStringW; // EFI_STATUS _openDir(const XStringW& path, bool* b, EFI_FILE** efiDir); bool _checkOEMPath(); diff --git a/rEFIt_UEFI/Platform/Settings.cpp b/rEFIt_UEFI/Platform/Settings.cpp index 1b7b89aff..10b84c91f 100644 --- a/rEFIt_UEFI/Platform/Settings.cpp +++ b/rEFIt_UEFI/Platform/Settings.cpp @@ -1556,6 +1556,14 @@ BOOLEAN IsOSValid(const XString8& MatchOS, const XString8& CurrOS) XString8Array osToc = Split(MatchOS, "."_XS8).trimEachString(); XString8Array currOStoc = Split(CurrOS, "."_XS8).trimEachString(); + + if ( osToc.size() > 0 && currOStoc.size() > 0 && osToc[0] == "11"_XS8 && currOStoc[0] == "11"_XS8 ) { + if (osToc.size() == 1 ) return true; + if (osToc.size() == 2 ) { + if ( osToc[1].equalIC("x") ) return true; + if ( currOStoc.size() == 2 && osToc[1] == currOStoc[1] ) return true; + } + } if (osToc.size() == 2) { if (currOStoc.size() == 2) { if ( osToc[0] == currOStoc[0] && osToc[1] == currOStoc[1]) { diff --git a/rEFIt_UEFI/cpp_foundation/shared_ptr.h b/rEFIt_UEFI/cpp_foundation/shared_ptr.h index cf7150381..d25808766 100644 --- a/rEFIt_UEFI/cpp_foundation/shared_ptr.h +++ b/rEFIt_UEFI/cpp_foundation/shared_ptr.h @@ -36,25 +36,31 @@ public: } // Overload post/pre increment - void operator++() + Counter& operator++() { m_counter++; + return *this; } - void operator++(int) - { - m_counter++; - } - - // Overload post/pre decrement - void operator--() - { - m_counter--; - } - void operator--(int) +// Counter operator++(int) +// { +// Counter tmp = *this; +// m_counter++; +// return tmp; +// } +// +// // Overload post/pre decrement + Counter& operator--() { m_counter--; + return *this; } +// Counter operator--(int) +// { +// Counter tmp = *this; +// m_counter--; +// return tmp; +// } private: unsigned int m_counter{}; @@ -71,7 +77,7 @@ public: m_ptr = ptr; m_counter = new Counter(); if (ptr) { - (*m_counter)++; + ++(*m_counter); } } @@ -80,7 +86,7 @@ public: { m_ptr = sp.m_ptr; m_counter = sp.m_counter; - (*m_counter)++; + ++(*m_counter); } // Reference count @@ -107,7 +113,7 @@ public: // Destructor ~Shared_ptr() { - (*m_counter)--; + --(*m_counter); if (m_counter->get() == 0) { delete m_counter; delete m_ptr; diff --git a/rEFIt_UEFI/libeg/XTheme.h b/rEFIt_UEFI/libeg/XTheme.h index 871c287ad..a3ca6c254 100644 --- a/rEFIt_UEFI/libeg/XTheme.h +++ b/rEFIt_UEFI/libeg/XTheme.h @@ -21,7 +21,7 @@ class XTheme public: XObjArray Icons; protected: - XStringW m_ThemePath; + XStringW m_ThemePath = NullXStringW; EFI_FILE *ThemeDir; public: