diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2025-11-29 15:01:34 -0500 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal@nekernel.org> | 2025-11-29 15:01:34 -0500 |
| commit | ceabd82ac8e796249feacf39c836034ed5e11c6d (patch) | |
| tree | e446d471a0eaf4ed7ac67e878ce4fb02334a2acb /src/boot/BootKit | |
| parent | 0376382a848ef5ebbb0e02428c9d1df8a099d8b4 (diff) | |
chore: source code review and fixes.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'src/boot/BootKit')
| -rw-r--r-- | src/boot/BootKit/BootKit.h | 20 | ||||
| -rw-r--r-- | src/boot/BootKit/HW/ATA.h | 6 | ||||
| -rw-r--r-- | src/boot/BootKit/HW/SATA.h | 2 | ||||
| -rw-r--r-- | src/boot/BootKit/Qr.h | 6 |
4 files changed, 17 insertions, 17 deletions
diff --git a/src/boot/BootKit/BootKit.h b/src/boot/BootKit/BootKit.h index e1a2b628..55392ef6 100644 --- a/src/boot/BootKit/BootKit.h +++ b/src/boot/BootKit/BootKit.h @@ -40,7 +40,7 @@ /***********************************************************************************/ namespace Boot { -void ThrowError(const WideChar* errorCode, const WideChar* reason) noexcept; +void ThrowError(const WideChar* errorCode, const WideChar* reason); class BootTextWriter; class BootFileReader; @@ -205,7 +205,7 @@ class BDiskFormatFactory final { Boolean Format(const Char* part_name); /// @brief check if partition is good. - Bool IsPartitionValid() noexcept { + Bool IsPartitionValid() { #if defined(BOOTZ_EPM_SUPPORT) fDiskDev.Leak().mBase = (kEPMBootBlockLba); fDiskDev.Leak().mSize = sizeof(EPM_PART_BLOCK); @@ -293,16 +293,16 @@ inline Boolean BDiskFormatFactory<BootDev>::Format(const Char* part_name) { CopyMem(gpt_part->Signature, reinterpret_cast<VoidPtr>(const_cast<Char*>(kMagicGPT)), StrLen(kMagicGPT)); - gpt_part->Revision = 0x00010000; + gpt_part->Revision = 0x00010000; gpt_part->HeaderSize = sizeof(GPT_PARTITION_TABLE); gpt_part->CRC32 = 0x00000000; - gpt_part->Reserved1 = 0x00000000; - gpt_part->LBAHeader = 0x00000000; - gpt_part->LBAAltHeader = 0x00000000; + gpt_part->Reserved1 = 0x00000000; + gpt_part->LBAHeader = 0x00000000; + gpt_part->LBAAltHeader = 0x00000000; gpt_part->FirstGPTEntry = 0x00000000; - gpt_part->LastGPTEntry = 0x00000000; + gpt_part->LastGPTEntry = 0x00000000; gpt_part->Guid.Data1 = 0x00000000; gpt_part->Guid.Data2 = 0x0000; @@ -312,10 +312,10 @@ inline Boolean BDiskFormatFactory<BootDev>::Format(const Char* part_name) { gpt_part->Revision = 0x00010000; - gpt_part->StartingLBA = 0x00000000; + gpt_part->StartingLBA = 0x00000000; gpt_part->NumPartitionEntries = 0x00000000; - gpt_part->SizeOfEntries = 0x00000000; - gpt_part->CRC32PartEntry = 0x00000000; + gpt_part->SizeOfEntries = 0x00000000; + gpt_part->CRC32PartEntry = 0x00000000; SetMem(gpt_part->Reserved2, 0, kSectorAlignGPT_PartTbl); diff --git a/src/boot/BootKit/HW/ATA.h b/src/boot/BootKit/HW/ATA.h index 25629869..7ebf296d 100644 --- a/src/boot/BootKit/HW/ATA.h +++ b/src/boot/BootKit/HW/ATA.h @@ -18,7 +18,7 @@ class BootDeviceATA final : public Device { kSecondary = ATA_SECONDARY_IO, }; - explicit BootDeviceATA() noexcept; + explicit BootDeviceATA(); ~BootDeviceATA() = default; enum { kSectorSize = kATASectorSize }; @@ -34,8 +34,8 @@ class BootDeviceATA final : public Device { public: operator bool(); - SizeT GetSectorsCount() noexcept; - SizeT GetDiskSize() noexcept; + SizeT GetSectorsCount(); + SizeT GetDiskSize(); BootDeviceATA& Read(Char* Buf, SizeT SecCount) override; BootDeviceATA& Write(Char* Buf, SizeT SecCount) override; diff --git a/src/boot/BootKit/HW/SATA.h b/src/boot/BootKit/HW/SATA.h index 07ce7611..68ed30c8 100644 --- a/src/boot/BootKit/HW/SATA.h +++ b/src/boot/BootKit/HW/SATA.h @@ -14,7 +14,7 @@ class BootDeviceSATA final { public: - explicit BootDeviceSATA() noexcept; + explicit BootDeviceSATA(); ~BootDeviceSATA() = default; NE_COPY_DEFAULT(BootDeviceSATA) diff --git a/src/boot/BootKit/Qr.h b/src/boot/BootKit/Qr.h index f537aa5e..f5ac5f2e 100644 --- a/src/boot/BootKit/Qr.h +++ b/src/boot/BootKit/Qr.h @@ -235,7 +235,7 @@ template <int V> struct Qr { private: friend class QrDelegate; - bool draw(int x, int y) noexcept; + bool draw(int x, int y); public: constexpr auto side_size() const { return SIDE; } @@ -303,7 +303,7 @@ bool Qr<V>::module(int x, int y) { /// @brief draw a new QR code. template <int V> -bool Qr<V>::draw(int whereX, int whereY) noexcept { +bool Qr<V>::draw(int whereX, int whereY) { if (!this->status) return false; // it may be invalid. cg_init(); @@ -784,7 +784,7 @@ class QrDelegate final { /// @brief Draw method delegate. template <Int32 V> - bool draw(Qr<V>& subject, Int32 x, Int32 y) noexcept { + bool draw(Qr<V>& subject, Int32 x, Int32 y) { return subject.draw(x, y); } }; |
