Added PCI device detection and a start script.
This commit is contained in:
@@ -87,6 +87,38 @@ public:
|
||||
return append(other);
|
||||
}
|
||||
|
||||
constexpr bool operator==(const basic_string& other) const noexcept
|
||||
{
|
||||
if (size() != other.size()) {
|
||||
return false;
|
||||
}
|
||||
for (size_t idx = 0; idx < size(); ++idx) {
|
||||
if (at(idx) != other.at(idx)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
constexpr bool operator!=(const basic_string& other) const noexcept
|
||||
{
|
||||
return !(*this == other); // NOLINT
|
||||
}
|
||||
constexpr bool operator==(const value_type* cStr) const noexcept
|
||||
{
|
||||
for (value_type chr : *this)
|
||||
{
|
||||
if (*cStr == '\0' || chr != *cStr) {
|
||||
return false;
|
||||
}
|
||||
++cStr;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
constexpr bool operator!=(const value_type* cStr) const noexcept
|
||||
{
|
||||
return !(*this == cStr); // NOLINT
|
||||
}
|
||||
|
||||
[[nodiscard]] constexpr reference operator[](size_type pos) noexcept { return _data[pos]; }
|
||||
[[nodiscard]] constexpr const_reference operator[](size_type pos) const noexcept { return _data[pos]; }
|
||||
|
||||
@@ -152,6 +184,18 @@ public:
|
||||
static inline size_type npos = size_type(-1);
|
||||
};
|
||||
using string = basic_string<char>;
|
||||
|
||||
template<typename CharT, typename Traits = char_traits<CharT>> // TODO: Allocator
|
||||
constexpr bool operator==(const CharT* cStr, const basic_string<CharT, Traits>& str) noexcept
|
||||
{
|
||||
return str == cStr;
|
||||
}
|
||||
|
||||
template<typename CharT, typename Traits = char_traits<CharT>> // TODO: Allocator
|
||||
constexpr bool operator!=(const CharT* cStr, const basic_string<CharT, Traits>& str) noexcept
|
||||
{
|
||||
return str != cStr;
|
||||
}
|
||||
}
|
||||
|
||||
#endif // !defined(BAD_APPLE_OS_STRING_INCLUDED)
|
||||
|
||||
Reference in New Issue
Block a user