mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 02:17:34 +00:00
LibPCIDB: Mark compilation-unit-only functions as static
This enables a nice warning in case a function becomes dead code.
This commit is contained in:
parent
1396ce8a9b
commit
5fa771c8b2
1 changed files with 2 additions and 4 deletions
|
@ -106,7 +106,7 @@ const StringView Database::get_programming_interface(u8 class_id, u8 subclass_id
|
||||||
return programming_interface.value()->name;
|
return programming_interface.value()->name;
|
||||||
}
|
}
|
||||||
|
|
||||||
u8 parse_hex_digit(char digit)
|
static u8 parse_hex_digit(char digit)
|
||||||
{
|
{
|
||||||
if (digit >= '0' && digit <= '9')
|
if (digit >= '0' && digit <= '9')
|
||||||
return digit - '0';
|
return digit - '0';
|
||||||
|
@ -115,7 +115,7 @@ u8 parse_hex_digit(char digit)
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
T parse_hex(StringView str, size_t count)
|
static T parse_hex(StringView str, size_t count)
|
||||||
{
|
{
|
||||||
ASSERT(str.length() >= count);
|
ASSERT(str.length() >= count);
|
||||||
|
|
||||||
|
@ -180,7 +180,6 @@ int Database::init()
|
||||||
|
|
||||||
auto lines = m_view.split_view('\n');
|
auto lines = m_view.split_view('\n');
|
||||||
|
|
||||||
|
|
||||||
for (auto& line : lines) {
|
for (auto& line : lines) {
|
||||||
if (line.length() < 2 || line[0] == '#')
|
if (line.length() < 2 || line[0] == '#')
|
||||||
continue;
|
continue;
|
||||||
|
@ -243,7 +242,6 @@ int Database::init()
|
||||||
|
|
||||||
m_ready = true;
|
m_ready = true;
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue