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
|
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))
|
if (!StringStartsWith(line, MOUNT_STATE_BEGIN))
|
||||||
return false;
|
return false;
|
||||||
@ -144,7 +145,7 @@ storage_state_restore(const char *line, LineReader &file, Instance &instance)
|
|||||||
}
|
}
|
||||||
|
|
||||||
unsigned
|
unsigned
|
||||||
storage_state_get_hash(const Instance &instance)
|
storage_state_get_hash(const Instance &instance) noexcept
|
||||||
{
|
{
|
||||||
if (instance.storage == nullptr)
|
if (instance.storage == nullptr)
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -30,18 +30,20 @@ class BufferedOutputStream;
|
|||||||
class LineReader;
|
class LineReader;
|
||||||
|
|
||||||
void
|
void
|
||||||
storage_state_save(BufferedOutputStream &os, const Instance &instance);
|
storage_state_save(BufferedOutputStream &os,
|
||||||
|
const Instance &instance);
|
||||||
|
|
||||||
bool
|
bool
|
||||||
storage_state_restore(const char *line, LineReader &file,
|
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.
|
* 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
|
* This is used by timer_save_state_file() to determine whether the state
|
||||||
* has changed and the state file should be saved.
|
* has changed and the state file should be saved.
|
||||||
*/
|
*/
|
||||||
|
[[gnu::pure]]
|
||||||
unsigned
|
unsigned
|
||||||
storage_state_get_hash(const Instance &instance);
|
storage_state_get_hash(const Instance &instance) noexcept;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user