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:
Ben Wiederhake 2020-08-11 00:10:28 +02:00 committed by Andreas Kling
parent 1396ce8a9b
commit 5fa771c8b2
Notes: sideshowbarker 2024-07-19 03:42:16 +09:00

View File

@ -106,7 +106,7 @@ const StringView Database::get_programming_interface(u8 class_id, u8 subclass_id
return programming_interface.value()->name;
}
u8 parse_hex_digit(char digit)
static u8 parse_hex_digit(char digit)
{
if (digit >= '0' && digit <= '9')
return digit - '0';
@ -115,7 +115,7 @@ u8 parse_hex_digit(char digit)
}
template<typename T>
T parse_hex(StringView str, size_t count)
static T parse_hex(StringView str, size_t count)
{
ASSERT(str.length() >= count);
@ -180,7 +180,6 @@ int Database::init()
auto lines = m_view.split_view('\n');
for (auto& line : lines) {
if (line.length() < 2 || line[0] == '#')
continue;
@ -243,7 +242,6 @@ int Database::init()
m_ready = true;
return 0;
}