summaryrefslogtreecommitdiffhomepage
path: root/public/frameworks
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@nekernel.org>2025-11-29 15:01:34 -0500
committerAmlal El Mahrouss <amlal@nekernel.org>2025-11-29 15:01:34 -0500
commitceabd82ac8e796249feacf39c836034ed5e11c6d (patch)
treee446d471a0eaf4ed7ac67e878ce4fb02334a2acb /public/frameworks
parent0376382a848ef5ebbb0e02428c9d1df8a099d8b4 (diff)
chore: source code review and fixes.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'public/frameworks')
-rw-r--r--public/frameworks/CoreFoundation.fwrk/headers/Foundation.h4
-rw-r--r--public/frameworks/CoreFoundation.fwrk/headers/Property.h7
-rw-r--r--public/frameworks/CoreFoundation.fwrk/headers/Ref.h7
-rw-r--r--public/frameworks/CoreFoundation.fwrk/headers/String.h4
-rw-r--r--public/frameworks/CoreFoundation.fwrk/src/Foundation.cc4
-rw-r--r--public/frameworks/DiskImage.fwrk/headers/DiskImage.h6
-rw-r--r--public/frameworks/DiskImage.fwrk/src/DiskImage+EPM.cc2
-rw-r--r--public/frameworks/DiskImage.fwrk/src/DiskImage+HeFS.cc2
-rw-r--r--public/frameworks/DiskImage.fwrk/src/DiskImage+NeFS.cc2
-rw-r--r--public/frameworks/KernelTest.fwrk/headers/TestCase.h5
-rw-r--r--public/frameworks/LaunchHelpers.fwrk/headers/Foundation.h2
11 files changed, 23 insertions, 22 deletions
diff --git a/public/frameworks/CoreFoundation.fwrk/headers/Foundation.h b/public/frameworks/CoreFoundation.fwrk/headers/Foundation.h
index 68b00264..a8a31559 100644
--- a/public/frameworks/CoreFoundation.fwrk/headers/Foundation.h
+++ b/public/frameworks/CoreFoundation.fwrk/headers/Foundation.h
@@ -69,8 +69,8 @@ struct CFRect final {
operator bool();
- BOOL SizeMatches(CFRect& rect) noexcept;
- BOOL PositionMatches(CFRect& rect) noexcept;
+ BOOL SizeMatches(CFRect& rect);
+ BOOL PositionMatches(CFRect& rect);
};
union CFGUID final {
diff --git a/public/frameworks/CoreFoundation.fwrk/headers/Property.h b/public/frameworks/CoreFoundation.fwrk/headers/Property.h
index b8784f68..d16f7742 100644
--- a/public/frameworks/CoreFoundation.fwrk/headers/Property.h
+++ b/public/frameworks/CoreFoundation.fwrk/headers/Property.h
@@ -42,12 +42,11 @@ class CFProperty final CF_OBJECT {
CFString& GetKey();
private:
- CFString* fName{nullptr};
- CFPropertyId fValue{0UL};
- CFRef<CFGUID> fGUID{};
+ CFString* fName{nullptr};
+ CFPropertyId fValue{0UL};
+ CFRef<CFGUID> fGUID{};
};
template <SizeT N>
using CFPropertyArray = CFArray<CFProperty, N>;
} // namespace CF
-
diff --git a/public/frameworks/CoreFoundation.fwrk/headers/Ref.h b/public/frameworks/CoreFoundation.fwrk/headers/Ref.h
index 6757daac..0bc728ce 100644
--- a/public/frameworks/CoreFoundation.fwrk/headers/Ref.h
+++ b/public/frameworks/CoreFoundation.fwrk/headers/Ref.h
@@ -44,16 +44,16 @@ class CFRef final CF_OBJECT {
return *fClass;
}
- T& Leak() noexcept { return *fClass; }
+ T& Leak() { return *fClass; }
- T& TryLeak() const noexcept {
+ T& TryLeak() const {
MUST_PASS(*fClass);
return *fClass;
}
T operator*() { return *fClass; }
- operator bool() noexcept { return fClass; }
+ operator bool() { return fClass; }
private:
T* fClass{nullptr};
@@ -83,4 +83,3 @@ class CFNonNullRef final {
CFRef<T> fRef{nullptr};
};
} // namespace CF
-
diff --git a/public/frameworks/CoreFoundation.fwrk/headers/String.h b/public/frameworks/CoreFoundation.fwrk/headers/String.h
index 247d3894..2a44d1cb 100644
--- a/public/frameworks/CoreFoundation.fwrk/headers/String.h
+++ b/public/frameworks/CoreFoundation.fwrk/headers/String.h
@@ -19,7 +19,7 @@ class CFStringBuilder;
class CFString final CF_OBJECT {
public:
CFString() = delete;
-
+
explicit CFString(const SizeT sz);
explicit CFString(const Char* str);
@@ -40,7 +40,7 @@ class CFStringBuilder final {
public:
static CFRef<CFString> Construct(const Char*);
static const Char* FromBool(const Char*, BOOL);
- static const Char* Format(const Char*, const Char*);
+ static const Char* Format(const Char*, const Char*);
static BOOL Equals(const Char, const Char*);
static BOOL Equals(const Char*, const Char*);
diff --git a/public/frameworks/CoreFoundation.fwrk/src/Foundation.cc b/public/frameworks/CoreFoundation.fwrk/src/Foundation.cc
index e5de94a7..d50dbd7b 100644
--- a/public/frameworks/CoreFoundation.fwrk/src/Foundation.cc
+++ b/public/frameworks/CoreFoundation.fwrk/src/Foundation.cc
@@ -16,14 +16,14 @@ CF::CFRect::operator bool() {
/***********************************************************************************/
/// @brief returns true if size matches.
/***********************************************************************************/
-BOOL CF::CFRect::SizeMatches(CF::CFRect& rect) noexcept {
+BOOL CF::CFRect::SizeMatches(CF::CFRect& rect) {
return rect.height == height && rect.width == width;
}
/***********************************************************************************/
/// @brief returns true if position matches.
/***********************************************************************************/
-BOOL CF::CFRect::PositionMatches(CF::CFRect& rect) noexcept {
+BOOL CF::CFRect::PositionMatches(CF::CFRect& rect) {
return rect.y == y && rect.x == x;
}
diff --git a/public/frameworks/DiskImage.fwrk/headers/DiskImage.h b/public/frameworks/DiskImage.fwrk/headers/DiskImage.h
index 01cfc04a..9028592d 100644
--- a/public/frameworks/DiskImage.fwrk/headers/DiskImage.h
+++ b/public/frameworks/DiskImage.fwrk/headers/DiskImage.h
@@ -45,16 +45,16 @@ struct DI_DISK_IMAGE {
/// @brief Format with an EPM partition.
/// @param img disk image structure.
/// @return Status code upon completion.
-SInt32 DIFormatPartitionEPM(struct DI_DISK_IMAGE& img) noexcept;
+SInt32 DIFormatPartitionEPM(struct DI_DISK_IMAGE& img);
/// @brief NeFS format over EPM.
/// @param img disk image structure.
/// @return Status code upon completion.
-SInt32 DIFormatFilesystemNeFS(struct DI_DISK_IMAGE& img) noexcept;
+SInt32 DIFormatFilesystemNeFS(struct DI_DISK_IMAGE& img);
/// @brief OpenHeFS format over EPM.
/// @param img disk image structure.
/// @return Status code upon completion.
-SInt32 DIFormatFilesystemHeFS(struct DI_DISK_IMAGE& img) noexcept;
+SInt32 DIFormatFilesystemHeFS(struct DI_DISK_IMAGE& img);
} // namespace DI
diff --git a/public/frameworks/DiskImage.fwrk/src/DiskImage+EPM.cc b/public/frameworks/DiskImage.fwrk/src/DiskImage+EPM.cc
index 28c0cd7d..ab533e20 100644
--- a/public/frameworks/DiskImage.fwrk/src/DiskImage+EPM.cc
+++ b/public/frameworks/DiskImage.fwrk/src/DiskImage+EPM.cc
@@ -15,7 +15,7 @@
/// @brief EPM format disk
/// @param img disk image structure.
/// @return Status code upon completion.
-SInt32 DI::DIFormatPartitionEPM(struct DI_DISK_IMAGE& img) noexcept {
+SInt32 DI::DIFormatPartitionEPM(struct DI_DISK_IMAGE& img) {
if (!img.sector_sz || (img.sector_sz % 512 != 0)) return kDIFailureStatus;
if (!img.fs_version) return kDIFailureStatus;
if (*img.out_name == 0 || *img.disk_name == 0) return kDIFailureStatus;
diff --git a/public/frameworks/DiskImage.fwrk/src/DiskImage+HeFS.cc b/public/frameworks/DiskImage.fwrk/src/DiskImage+HeFS.cc
index 297650dc..f57de649 100644
--- a/public/frameworks/DiskImage.fwrk/src/DiskImage+HeFS.cc
+++ b/public/frameworks/DiskImage.fwrk/src/DiskImage+HeFS.cc
@@ -15,7 +15,7 @@
/// @brief format OpenHeFS over an EPM disk.
/// @param img disk image structure.
/// @return Status code upon completion.
-SInt32 DI::DIFormatFilesystemHeFS(struct DI_DISK_IMAGE& img) noexcept {
+SInt32 DI::DIFormatFilesystemHeFS(struct DI_DISK_IMAGE& img) {
if (!img.sector_sz || (img.sector_sz % kDISectorSz != 0)) return kDIFailureStatus;
if (*img.out_name == 0 || *img.disk_name == 0) return kDIFailureStatus;
diff --git a/public/frameworks/DiskImage.fwrk/src/DiskImage+NeFS.cc b/public/frameworks/DiskImage.fwrk/src/DiskImage+NeFS.cc
index 30c20cf7..562eb598 100644
--- a/public/frameworks/DiskImage.fwrk/src/DiskImage+NeFS.cc
+++ b/public/frameworks/DiskImage.fwrk/src/DiskImage+NeFS.cc
@@ -15,7 +15,7 @@
/// @brief format NeFS over an EPM disk.
/// @param img disk image structure.
/// @return Status code upon completion.
-SInt32 DI::DIFormatFilesystemNeFS(struct DI_DISK_IMAGE& img) noexcept {
+SInt32 DI::DIFormatFilesystemNeFS(struct DI_DISK_IMAGE& img) {
if (!img.sector_sz || (img.sector_sz % kDISectorSz != 0)) return kDIFailureStatus;
if (*img.out_name == 0 || *img.disk_name == 0) return kDIFailureStatus;
diff --git a/public/frameworks/KernelTest.fwrk/headers/TestCase.h b/public/frameworks/KernelTest.fwrk/headers/TestCase.h
index c040ca0f..26325d42 100644
--- a/public/frameworks/KernelTest.fwrk/headers/TestCase.h
+++ b/public/frameworks/KernelTest.fwrk/headers/TestCase.h
@@ -13,7 +13,10 @@
/// @file TestCase.h
/// ================================================================================
-#define KT_RUN_TEST(OBJECT) {KTTestCase##OBJECT{}.Run();}
+#define KT_RUN_TEST(OBJECT) \
+ { \
+ KTTestCase##OBJECT{}.Run(); \
+ }
#define KT_MUST_PASS(MSG, LEFT_COND, RIGHT_COND) \
if (LEFT_COND != RIGHT_COND) { \
diff --git a/public/frameworks/LaunchHelpers.fwrk/headers/Foundation.h b/public/frameworks/LaunchHelpers.fwrk/headers/Foundation.h
index de4e6b09..36ce50ac 100644
--- a/public/frameworks/LaunchHelpers.fwrk/headers/Foundation.h
+++ b/public/frameworks/LaunchHelpers.fwrk/headers/Foundation.h
@@ -25,5 +25,5 @@ struct LHLaunchInfo final {
/// @brief Get launch information.
/// @return the launch information structure.
-LHLaunchInfo* LHGetLaunchInfo(Void) noexcept;
+LHLaunchInfo* LHGetLaunchInfo(Void);
} // namespace LaunchHelpers \ No newline at end of file