summaryrefslogtreecommitdiffhomepage
path: root/Private/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Private/Source')
-rw-r--r--Private/Source/DriveManager.cxx11
-rw-r--r--Private/Source/Framebuffer.cxx24
-rw-r--r--Private/Source/GUIDWizard.cxx8
-rw-r--r--Private/Source/Network/IP.cxx18
-rw-r--r--Private/Source/PRDT.cxx23
-rw-r--r--Private/Source/PageManager.cxx34
-rw-r--r--Private/Source/Pmm.cxx16
-rw-r--r--Private/Source/Property.cxx4
-rw-r--r--Private/Source/SMPManager.cxx70
-rw-r--r--Private/Source/String.cxx24
-rw-r--r--Private/Source/URL.cxx6
-rw-r--r--Private/Source/Utils.cxx2
-rw-r--r--Private/Source/Variant.cxx4
13 files changed, 116 insertions, 128 deletions
diff --git a/Private/Source/DriveManager.cxx b/Private/Source/DriveManager.cxx
index d04faa68..b468ebae 100644
--- a/Private/Source/DriveManager.cxx
+++ b/Private/Source/DriveManager.cxx
@@ -25,7 +25,12 @@ Void ke_drv_input(DriveTrait::DrivePacket* pckt) {
pckt->fPacketGood = false;
+#ifndef __AHCI__
drv_std_read(pckt->fLba, kATAIO, kATAMaster, (Char*)pckt->fPacketContent, 1, pckt->fPacketSize);
+#else
+ drv_std_read(pckt->fLba, (Char*)pckt->fPacketContent, 1, pckt->fPacketSize);
+#endif
+
pckt->fPacketGood = true;
}
@@ -40,7 +45,11 @@ Void ke_drv_output(DriveTrait::DrivePacket* pckt) {
pckt->fPacketGood = false;
+#ifndef __AHCI__
drv_std_write(pckt->fLba, kATAIO, kATAMaster, (Char*)pckt->fPacketContent, 1, pckt->fPacketSize);
+#else
+ drv_std_write(pckt->fLba,(Char*)pckt->fPacketContent, 1, pckt->fPacketSize);
+#endif
pckt->fPacketGood = true;
}
@@ -68,7 +77,7 @@ const Char* ke_drive_kind(Void) { return "ATA-DMA"; }
#endif
#ifdef __AHCI__
-const Char* ke_drive_kind(Void) { return "AHCO"; }
+const Char* ke_drive_kind(Void) { return "AHCI"; }
#endif
/// @brief Unimplemented drive.
diff --git a/Private/Source/Framebuffer.cxx b/Private/Source/Framebuffer.cxx
index d0be2a13..5dc54c81 100644
--- a/Private/Source/Framebuffer.cxx
+++ b/Private/Source/Framebuffer.cxx
@@ -36,14 +36,14 @@ const UInt32 kRgbWhite = 0xFFFFFFFF;
* @return volatile*
*/
volatile UIntPtr *Framebuffer::operator[](const UIntPtr &pos) {
- return (UIntPtr *)(m_FrameBufferAddr->m_Base * pos);
+ return (UIntPtr *)(fFrameBufferAddr->fBase * pos);
}
/// @brief Boolean operator.
Framebuffer::operator bool() {
- return m_FrameBufferAddr.Leak()->m_Base != 0 &&
- m_Colour != FramebufferColorKind::INVALID &&
- m_FrameBufferAddr.Leak()->m_Base != kBadPtr;
+ return fFrameBufferAddr.Leak()->fBase != 0 &&
+ fColour != FramebufferColorKind::INVALID &&
+ fFrameBufferAddr.Leak()->fBase != kBadPtr;
}
/// @brief Set color kind of framebuffer.
@@ -51,26 +51,26 @@ Framebuffer::operator bool() {
/// @return
const FramebufferColorKind &Framebuffer::Color(
const FramebufferColorKind &colour) {
- if (m_Colour != FramebufferColorKind::INVALID &&
+ if (fColour != FramebufferColorKind::INVALID &&
colour != FramebufferColorKind::INVALID) {
- m_Colour = colour;
+ fColour = colour;
}
- return m_Colour;
+ return fColour;
}
/// @brief Leak framebuffer context.
/// @return The reference of the framebuffer context.
Ref<FramebufferContext *> &Framebuffer::Leak() {
- return this->m_FrameBufferAddr;
+ return this->fFrameBufferAddr;
}
Framebuffer &Framebuffer::DrawRect(SizeT width, SizeT height, SizeT x, SizeT y,
UInt32 color) {
for (NewOS::SizeT i = x; i < width + x; ++i) {
for (NewOS::SizeT u = y; u < height + y; ++u) {
- *(((volatile NewOS::UInt32 *)(m_FrameBufferAddr.Leak()->m_Base +
- 4 * m_FrameBufferAddr.Leak()->m_Bpp * i +
+ *(((volatile NewOS::UInt32 *)(fFrameBufferAddr.Leak()->fBase +
+ 4 * fFrameBufferAddr.Leak()->fBpp * i +
4 * u))) = color;
}
}
@@ -79,8 +79,8 @@ Framebuffer &Framebuffer::DrawRect(SizeT width, SizeT height, SizeT x, SizeT y,
}
Framebuffer &Framebuffer::PutPixel(SizeT x, SizeT y, UInt32 color) {
- *(((volatile NewOS::UInt32 *)(m_FrameBufferAddr.Leak()->m_Base +
- 4 * m_FrameBufferAddr.Leak()->m_Bpp * x +
+ *(((volatile NewOS::UInt32 *)(fFrameBufferAddr.Leak()->fBase +
+ 4 * fFrameBufferAddr.Leak()->fBpp * x +
4 * y))) = color;
return *this;
diff --git a/Private/Source/GUIDWizard.cxx b/Private/Source/GUIDWizard.cxx
index 90903979..9d0d4f35 100644
--- a/Private/Source/GUIDWizard.cxx
+++ b/Private/Source/GUIDWizard.cxx
@@ -24,10 +24,10 @@ auto make_sequence(const ArrayList<UShort>& uuidSeq) -> Ref<GUIDSequence*> {
Ref<GUIDSequence*> sequenceReference{seq, true};
- sequenceReference->m_Ms1 |= uuidSeq[0];
- sequenceReference->m_Ms2 |= uuidSeq[1];
- sequenceReference->m_Ms3 |= uuidSeq[2];
- sequenceReference->m_Ms3 |= uuidSeq[3];
+ sequenceReference->fMs1 |= uuidSeq[0];
+ sequenceReference->fMs2 |= uuidSeq[1];
+ sequenceReference->fMs3 |= uuidSeq[2];
+ sequenceReference->fMs3 |= uuidSeq[3];
return sequenceReference;
}
diff --git a/Private/Source/Network/IP.cxx b/Private/Source/Network/IP.cxx
index 04e5247d..06421c21 100644
--- a/Private/Source/Network/IP.cxx
+++ b/Private/Source/Network/IP.cxx
@@ -8,13 +8,13 @@
#include <NewKit/Utils.hpp>
namespace NewOS {
-char* RawIPAddress::Address() { return m_Addr; }
+char* RawIPAddress::Address() { return fAddr; }
-RawIPAddress::RawIPAddress(char bytes[4]) { rt_copy_memory(bytes, m_Addr, 4); }
+RawIPAddress::RawIPAddress(char bytes[4]) { rt_copy_memory(bytes, fAddr, 4); }
bool RawIPAddress::operator==(const RawIPAddress& ipv4) {
for (Size index = 0; index < 4; ++index) {
- if (ipv4.m_Addr[index] != m_Addr[index]) return false;
+ if (ipv4.fAddr[index] != fAddr[index]) return false;
}
return true;
@@ -22,7 +22,7 @@ bool RawIPAddress::operator==(const RawIPAddress& ipv4) {
bool RawIPAddress::operator!=(const RawIPAddress& ipv4) {
for (Size index = 0; index < 4; ++index) {
- if (ipv4.m_Addr[index] == m_Addr[index]) return false;
+ if (ipv4.fAddr[index] == fAddr[index]) return false;
}
return true;
@@ -34,11 +34,11 @@ char& RawIPAddress::operator[](const Size& index) {
static char IP_PLACEHOLDER = '0';
if (index > 4) return IP_PLACEHOLDER;
- return m_Addr[index];
+ return fAddr[index];
}
RawIPAddress6::RawIPAddress6(char bytes[8]) {
- rt_copy_memory(bytes, m_Addr, 8);
+ rt_copy_memory(bytes, fAddr, 8);
}
char& RawIPAddress6::operator[](const Size& index) {
@@ -47,12 +47,12 @@ char& RawIPAddress6::operator[](const Size& index) {
static char IP_PLACEHOLDER = '0';
if (index > 8) return IP_PLACEHOLDER;
- return m_Addr[index];
+ return fAddr[index];
}
bool RawIPAddress6::operator==(const RawIPAddress6& ipv6) {
for (SizeT index = 0; index < 8; ++index) {
- if (ipv6.m_Addr[index] != m_Addr[index]) return false;
+ if (ipv6.fAddr[index] != fAddr[index]) return false;
}
return true;
@@ -60,7 +60,7 @@ bool RawIPAddress6::operator==(const RawIPAddress6& ipv6) {
bool RawIPAddress6::operator!=(const RawIPAddress6& ipv6) {
for (SizeT index = 0; index < 8; ++index) {
- if (ipv6.m_Addr[index] == m_Addr[index]) return false;
+ if (ipv6.fAddr[index] == fAddr[index]) return false;
}
return true;
diff --git a/Private/Source/PRDT.cxx b/Private/Source/PRDT.cxx
index f999dfd6..42808a43 100644
--- a/Private/Source/PRDT.cxx
+++ b/Private/Source/PRDT.cxx
@@ -8,25 +8,4 @@
#include <NewKit/String.hpp>
#include <StorageKit/PRDT.hpp>
-namespace NewOS {
-PRDT::PRDT(const UIntPtr& physAddr) : m_PrdtAddr(physAddr) {
- MUST_PASS(physAddr);
- kcout << "PRDT::PRDT() {}\r\n";
-}
-
-PRDT::~PRDT() {
- kcout << "PRDT::~PRDT() {}\r\n";
- m_PrdtAddr = 0;
-}
-
-const UInt& PRDT::Low() { return m_Low; }
-
-const UShort& PRDT::High() { return m_High; }
-
-const UIntPtr& PRDT::PhysicalAddress() { return m_PrdtAddr; }
-
-PRDT& PRDT::operator=(const UIntPtr& prdtAddress) {
- m_PrdtAddr = prdtAddress;
- return *this;
-}
-} // namespace NewOS
+namespace NewOS {} // namespace NewOS
diff --git a/Private/Source/PageManager.cxx b/Private/Source/PageManager.cxx
index 4c4524cd..0704734c 100644
--- a/Private/Source/PageManager.cxx
+++ b/Private/Source/PageManager.cxx
@@ -17,15 +17,15 @@
namespace NewOS {
PTEWrapper::PTEWrapper(Boolean Rw, Boolean User, Boolean ExecDisable,
UIntPtr VirtAddr)
- : m_Rw(Rw),
- m_User(User),
- m_ExecDisable(ExecDisable),
- m_VirtAddr(VirtAddr),
- m_Cache(false),
- m_Shareable(false),
- m_Wt(false),
- m_Present(true),
- m_Accessed(false) {}
+ : fRw(Rw),
+ fUser(User),
+ fExecDisable(ExecDisable),
+ fVirtAddr(VirtAddr),
+ fCache(false),
+ fShareable(false),
+ fWt(false),
+ fPresent(true),
+ fAccessed(false) {}
PTEWrapper::~PTEWrapper() {}
@@ -36,8 +36,8 @@ void PageManager::FlushTLB(UIntPtr VirtAddr) {
}
bool PTEWrapper::Reclaim() {
- if (!this->m_Present) {
- this->m_Present = true;
+ if (!this->fPresent) {
+ this->fPresent = true;
return true;
}
@@ -61,16 +61,16 @@ bool PageManager::Free(Ref<PTEWrapper *> &wrapper) {
}
const UIntPtr PTEWrapper::VirtualAddress() {
- return (m_VirtAddr + sizeof(PTE) + sizeof(PTEWrapper));
+ return (fVirtAddr + sizeof(PTE) + sizeof(PTEWrapper));
}
-bool PTEWrapper::Shareable() { return m_Shareable; }
+bool PTEWrapper::Shareable() { return fShareable; }
-bool PTEWrapper::Present() { return m_Present; }
+bool PTEWrapper::Present() { return fPresent; }
-bool PTEWrapper::Access() { return m_Accessed; }
+bool PTEWrapper::Access() { return fAccessed; }
-void PTEWrapper::NoExecute(const bool enable) { this->m_ExecDisable = enable; }
+void PTEWrapper::NoExecute(const bool enable) { this->fExecDisable = enable; }
-const bool &PTEWrapper::NoExecute() { return this->m_ExecDisable; }
+const bool &PTEWrapper::NoExecute() { return this->fExecDisable; }
} // namespace NewOS
diff --git a/Private/Source/Pmm.cxx b/Private/Source/Pmm.cxx
index ba5f62e8..7c331c65 100644
--- a/Private/Source/Pmm.cxx
+++ b/Private/Source/Pmm.cxx
@@ -8,15 +8,15 @@
#include <NewKit/Pmm.hpp>
namespace NewOS {
-Pmm::Pmm() : m_PageManager() { kcout << "[PMM] Allocate PageMemoryManager"; }
+Pmm::Pmm() : fPageManager() { kcout << "[PMM] Allocate PageMemoryManager"; }
Pmm::~Pmm() = default;
/* If this returns Null pointer, enter emergency mode */
Ref<PTEWrapper> Pmm::RequestPage(Boolean user, Boolean readWrite) {
- PTEWrapper pt = m_PageManager.Leak().Request(user, readWrite, false);
+ PTEWrapper pt = fPageManager.Leak().Request(user, readWrite, false);
- if (pt.m_Present) {
+ if (pt.fPresent) {
kcout << "[PMM]: Allocation was successful.";
return Ref<PTEWrapper>(pt);
}
@@ -29,7 +29,7 @@ Ref<PTEWrapper> Pmm::RequestPage(Boolean user, Boolean readWrite) {
Boolean Pmm::FreePage(Ref<PTEWrapper> PageRef) {
if (!PageRef) return false;
- PageRef.Leak().m_Present = false;
+ PageRef.Leak().fPresent = false;
return true;
}
@@ -37,7 +37,7 @@ Boolean Pmm::FreePage(Ref<PTEWrapper> PageRef) {
Boolean Pmm::TogglePresent(Ref<PTEWrapper> PageRef, Boolean Enable) {
if (!PageRef) return false;
- PageRef.Leak().m_Present = Enable;
+ PageRef.Leak().fPresent = Enable;
return true;
}
@@ -45,7 +45,7 @@ Boolean Pmm::TogglePresent(Ref<PTEWrapper> PageRef, Boolean Enable) {
Boolean Pmm::ToggleUser(Ref<PTEWrapper> PageRef, Boolean Enable) {
if (!PageRef) return false;
- PageRef.Leak().m_Rw = Enable;
+ PageRef.Leak().fRw = Enable;
return true;
}
@@ -53,7 +53,7 @@ Boolean Pmm::ToggleUser(Ref<PTEWrapper> PageRef, Boolean Enable) {
Boolean Pmm::ToggleRw(Ref<PTEWrapper> PageRef, Boolean Enable) {
if (!PageRef) return false;
- PageRef.Leak().m_Rw = Enable;
+ PageRef.Leak().fRw = Enable;
return true;
}
@@ -61,7 +61,7 @@ Boolean Pmm::ToggleRw(Ref<PTEWrapper> PageRef, Boolean Enable) {
Boolean Pmm::ToggleShare(Ref<PTEWrapper> PageRef, Boolean Enable) {
if (!PageRef) return false;
- PageRef.Leak().m_Shareable = Enable;
+ PageRef.Leak().fShareable = Enable;
return true;
}
diff --git a/Private/Source/Property.cxx b/Private/Source/Property.cxx
index 81cf430a..c9e20df8 100644
--- a/Private/Source/Property.cxx
+++ b/Private/Source/Property.cxx
@@ -8,8 +8,8 @@
namespace NewOS {
bool Property::StringEquals(StringView& name) {
- return m_sName && this->m_sName == name;
+ return fsName && this->fsName == name;
}
-const PropertyId& Property::GetPropertyById() { return m_Action; }
+const PropertyId& Property::GetPropertyById() { return fAction; }
} // namespace NewOS
diff --git a/Private/Source/SMPManager.cxx b/Private/Source/SMPManager.cxx
index 18625cc5..3c342e16 100644
--- a/Private/Source/SMPManager.cxx
+++ b/Private/Source/SMPManager.cxx
@@ -26,36 +26,36 @@ HardwareThread::~HardwareThread() = default;
//! @brief returns the id
-const ThreadID& HardwareThread::ID() noexcept { return m_ID; }
+const ThreadID& HardwareThread::ID() noexcept { return fID; }
//! @brief returns the kind
-const ThreadKind& HardwareThread::Kind() noexcept { return m_Kind; }
+const ThreadKind& HardwareThread::Kind() noexcept { return fKind; }
//! @brief is the core busy?
-bool HardwareThread::IsBusy() noexcept { return m_Busy; }
+bool HardwareThread::IsBusy() noexcept { return fBusy; }
/// @brief Get processor stack frame.
HAL::StackFramePtr HardwareThread::StackFrame() noexcept {
- MUST_PASS(m_Stack);
- return m_Stack;
+ MUST_PASS(fStack);
+ return fStack;
}
-void HardwareThread::Busy(const bool busy) noexcept { m_Busy = busy; }
+void HardwareThread::Busy(const bool busy) noexcept { fBusy = busy; }
-HardwareThread::operator bool() { return m_Stack; }
+HardwareThread::operator bool() { return fStack; }
/// @brief Wakeup the processor.
void HardwareThread::Wake(const bool wakeup) noexcept {
- m_Wakeup = wakeup;
+ fWakeup = wakeup;
- if (!m_Wakeup)
- rt_hang_thread(m_Stack);
+ if (!fWakeup)
+ rt_hang_thread(fStack);
else
- rt_wakeup_thread(m_Stack);
+ rt_wakeup_thread(fStack);
}
extern bool rt_check_stack(HAL::StackFramePtr stackPtr);
@@ -63,14 +63,14 @@ extern bool rt_check_stack(HAL::StackFramePtr stackPtr);
bool HardwareThread::Switch(HAL::StackFramePtr stack) {
if (!rt_check_stack(stack)) return false;
- m_Stack = stack;
+ fStack = stack;
- rt_do_context_switch(m_Stack);
+ rt_do_context_switch(fStack);
return true;
}
///! @brief Tells if processor is waked up.
-bool HardwareThread::IsWakeup() noexcept { return m_Wakeup; }
+bool HardwareThread::IsWakeup() noexcept { return fWakeup; }
//! @brief Constructor and destructor
@@ -88,10 +88,10 @@ Ref<SMPManager> SMPManager::Shared() {
/// @brief Get Stack Frame of Core
HAL::StackFramePtr SMPManager::GetStackFrame() noexcept {
- if (m_ThreadList[m_CurrentThread].Leak() &&
+ if (fThreadList[fCurrentThread].Leak() &&
ProcessHelper::GetCurrentPID() ==
- m_ThreadList[m_CurrentThread].Leak().Leak().m_PID)
- return m_ThreadList[m_CurrentThread].Leak().Leak().m_Stack;
+ fThreadList[fCurrentThread].Leak().Leak().fPID)
+ return fThreadList[fCurrentThread].Leak().Leak().fStack;
return nullptr;
}
@@ -102,31 +102,31 @@ bool SMPManager::Switch(HAL::StackFramePtr stack) {
for (SizeT idx = 0; idx < kMaxHarts; ++idx) {
// stack != nullptr -> if core is used, then continue.
- if (!m_ThreadList[idx].Leak() ||
- !m_ThreadList[idx].Leak().Leak().IsWakeup() ||
- m_ThreadList[idx].Leak().Leak().IsBusy())
+ if (!fThreadList[idx].Leak() ||
+ !fThreadList[idx].Leak().Leak().IsWakeup() ||
+ fThreadList[idx].Leak().Leak().IsBusy())
continue;
// to avoid any null deref.
- if (!m_ThreadList[idx].Leak().Leak().m_Stack) continue;
- if (m_ThreadList[idx].Leak().Leak().m_Stack->Rsp == 0) continue;
- if (m_ThreadList[idx].Leak().Leak().m_Stack->Rbp == 0) continue;
+ if (!fThreadList[idx].Leak().Leak().fStack) continue;
+ if (fThreadList[idx].Leak().Leak().fStack->Rsp == 0) continue;
+ if (fThreadList[idx].Leak().Leak().fStack->Rbp == 0) continue;
- m_ThreadList[idx].Leak().Leak().Busy(true);
+ fThreadList[idx].Leak().Leak().Busy(true);
- m_ThreadList[idx].Leak().Leak().m_ID = idx;
+ fThreadList[idx].Leak().Leak().fID = idx;
/// I figured out this:
/// Allocate stack
/// Set APIC base to stack
/// Do stuff and relocate stack based on this code.
/// - Amlel
- rt_copy_memory(stack, m_ThreadList[idx].Leak().Leak().m_Stack,
+ rt_copy_memory(stack, fThreadList[idx].Leak().Leak().fStack,
sizeof(HAL::StackFrame));
- m_ThreadList[idx].Leak().Leak().m_PID = ProcessHelper::GetCurrentPID();
+ fThreadList[idx].Leak().Leak().fPID = ProcessHelper::GetCurrentPID();
- m_ThreadList[idx].Leak().Leak().Busy(false);
+ fThreadList[idx].Leak().Leak().Busy(false);
return true;
}
@@ -141,32 +141,32 @@ bool SMPManager::Switch(HAL::StackFramePtr stack) {
*/
Ref<HardwareThread> SMPManager::operator[](const SizeT& idx) {
if (idx == 0) {
- if (m_ThreadList[idx].Leak().Leak().Kind() != kHartSystemReserved) {
- m_ThreadList[idx].Leak().Leak().m_Kind = kHartBoot;
+ if (fThreadList[idx].Leak().Leak().Kind() != kHartSystemReserved) {
+ fThreadList[idx].Leak().Leak().fKind = kHartBoot;
}
} else if (idx >= kMaxHarts) {
HardwareThread fakeThread;
- fakeThread.m_Kind = kInvalidHart;
+ fakeThread.fKind = kInvalidHart;
return {fakeThread};
}
- return m_ThreadList[idx].Leak();
+ return fThreadList[idx].Leak();
}
/**
* Check if thread pool isn't empty.
* @return
*/
-SMPManager::operator bool() noexcept { return !m_ThreadList.Empty(); }
+SMPManager::operator bool() noexcept { return !fThreadList.Empty(); }
/**
* Reverse operator bool
* @return
*/
-bool SMPManager::operator!() noexcept { return m_ThreadList.Empty(); }
+bool SMPManager::operator!() noexcept { return fThreadList.Empty(); }
/// @brief Returns the amount of core present.
/// @return the number of cores.
-SizeT SMPManager::Count() noexcept { return m_ThreadList.Count(); }
+SizeT SMPManager::Count() noexcept { return fThreadList.Count(); }
} // namespace NewOS
diff --git a/Private/Source/String.cxx b/Private/Source/String.cxx
index a204777d..8f571f34 100644
--- a/Private/Source/String.cxx
+++ b/Private/Source/String.cxx
@@ -9,17 +9,17 @@
#include <KernelKit/DebugOutput.hpp>
namespace NewOS {
-Char *StringView::Data() { return m_Data; }
+Char *StringView::Data() { return fData; }
-const Char *StringView::CData() { return m_Data; }
+const Char *StringView::CData() { return fData; }
-Size StringView::Length() const { return rt_string_len(m_Data); }
+Size StringView::Length() const { return rt_string_len(fData); }
bool StringView::operator==(const StringView &rhs) const {
if (rhs.Length() != this->Length()) return false;
for (Size index = 0; index < this->Length(); ++index) {
- if (rhs.m_Data[index] != m_Data[index]) return false;
+ if (rhs.fData[index] != fData[index]) return false;
}
return true;
@@ -29,7 +29,7 @@ bool StringView::operator==(const Char *rhs) const {
if (rt_string_len(rhs) != this->Length()) return false;
for (Size index = 0; index < rt_string_len(rhs); ++index) {
- if (rhs[index] != m_Data[index]) return false;
+ if (rhs[index] != fData[index]) return false;
}
return true;
@@ -39,7 +39,7 @@ bool StringView::operator!=(const StringView &rhs) const {
if (rhs.Length() != this->Length()) return false;
for (Size index = 0; index < rhs.Length(); ++index) {
- if (rhs.m_Data[index] == m_Data[index]) return false;
+ if (rhs.fData[index] == fData[index]) return false;
}
return true;
@@ -49,7 +49,7 @@ bool StringView::operator!=(const Char *rhs) const {
if (rt_string_len(rhs) != this->Length()) return false;
for (Size index = 0; index < rt_string_len(rhs); ++index) {
- if (rhs[index] == m_Data[index]) return false;
+ if (rhs[index] == fData[index]) return false;
}
return true;
@@ -174,17 +174,17 @@ static void string_append(char *lhs, char *rhs, int cur) {
}
StringView &StringView::operator+=(const Char *rhs) {
- string_append(this->m_Data, const_cast<char *>(rhs), this->m_Cur);
- this->m_Cur += rt_string_len(rhs);
+ string_append(this->fData, const_cast<char *>(rhs), this->fCur);
+ this->fCur += rt_string_len(rhs);
return *this;
}
StringView &StringView::operator+=(const StringView &rhs) {
- if (rt_string_len(rhs.m_Data) > rt_string_len(this->m_Data)) return *this;
+ if (rt_string_len(rhs.fData) > rt_string_len(this->fData)) return *this;
- string_append(this->m_Data, const_cast<char *>(rhs.m_Data), this->m_Cur);
- this->m_Cur += rt_string_len(const_cast<char *>(rhs.m_Data));
+ string_append(this->fData, const_cast<char *>(rhs.fData), this->fCur);
+ this->fCur += rt_string_len(const_cast<char *>(rhs.fData));
return *this;
}
diff --git a/Private/Source/URL.cxx b/Private/Source/URL.cxx
index c384c378..ebb325c1 100644
--- a/Private/Source/URL.cxx
+++ b/Private/Source/URL.cxx
@@ -11,7 +11,7 @@
/// BUGS: 0
namespace NewOS {
-Url::Url(StringView &strUrl) : m_urlView(strUrl, false) {}
+Url::Url(StringView &strUrl) : fUrlView(strUrl, false) {}
Url::~Url() = default;
@@ -63,7 +63,7 @@ ErrorOr<StringView> url_extract_protocol(const char *url) {
}
Ref<ErrorOr<StringView>> Url::Location() noexcept {
- const char *src = m_urlView.Leak().CData();
+ const char *src = fUrlView.Leak().CData();
auto loc = url_extract_location(src);
if (!loc) return {};
@@ -72,7 +72,7 @@ Ref<ErrorOr<StringView>> Url::Location() noexcept {
}
Ref<ErrorOr<StringView>> Url::Protocol() noexcept {
- const char *src = m_urlView.Leak().CData();
+ const char *src = fUrlView.Leak().CData();
auto loc = url_extract_protocol(src);
if (!loc) return {};
diff --git a/Private/Source/Utils.cxx b/Private/Source/Utils.cxx
index 9072ead9..75e158a0 100644
--- a/Private/Source/Utils.cxx
+++ b/Private/Source/Utils.cxx
@@ -157,7 +157,7 @@ voidPtr rt_string_in_string(const char *in, const char *needle) {
// @brief Checks for a string start at the character.
-char *rt_string_from_char(char *str, const char chr) {
+char *rt_string_frofchar(char *str, const char chr) {
while (*str != chr) {
++str;
diff --git a/Private/Source/Variant.cxx b/Private/Source/Variant.cxx
index 065d562e..fbea1768 100644
--- a/Private/Source/Variant.cxx
+++ b/Private/Source/Variant.cxx
@@ -8,11 +8,11 @@
namespace NewOS {
const Char* Variant::ToString() {
- if (m_Ptr == nullptr) {
+ if (fPtr == nullptr) {
return ("Memory:{Nullptr}");
}
- switch (m_Kind) {
+ switch (fKind) {
case VariantKind::kString:
return ("Class:{String}");
case VariantKind::kPointer: