storage/State: add noexcept
This commit is contained in:
parent
9467df526c
commit
a5d04be21f
@ -73,7 +73,8 @@ storage_state_save(BufferedOutputStream &os, const Instance &instance)
|
||||
}
|
||||
|
||||
bool
|
||||
storage_state_restore(const char *line, LineReader &file, Instance &instance)
|
||||
storage_state_restore(const char *line, LineReader &file,
|
||||
Instance &instance) noexcept
|
||||
{
|
||||
if (!StringStartsWith(line, MOUNT_STATE_BEGIN))
|
||||
return false;
|
||||
@ -144,7 +145,7 @@ storage_state_restore(const char *line, LineReader &file, Instance &instance)
|
||||
}
|
||||
|
||||
unsigned
|
||||
storage_state_get_hash(const Instance &instance)
|
||||
storage_state_get_hash(const Instance &instance) noexcept
|
||||
{
|
||||
if (instance.storage == nullptr)
|
||||
return 0;
|
||||
|
@ -30,18 +30,20 @@ class BufferedOutputStream;
|
||||
class LineReader;
|
||||
|
||||
void
|
||||
storage_state_save(BufferedOutputStream &os, const Instance &instance);
|
||||
storage_state_save(BufferedOutputStream &os,
|
||||
const Instance &instance);
|
||||
|
||||
bool
|
||||
storage_state_restore(const char *line, LineReader &file,
|
||||
Instance &instance);
|
||||
Instance &instance) noexcept;
|
||||
|
||||
/**
|
||||
* Generates a hash number for the current state of the composite storage.
|
||||
* This is used by timer_save_state_file() to determine whether the state
|
||||
* has changed and the state file should be saved.
|
||||
*/
|
||||
[[gnu::pure]]
|
||||
unsigned
|
||||
storage_state_get_hash(const Instance &instance);
|
||||
storage_state_get_hash(const Instance &instance) noexcept;
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user