mirror of
https://github.com/mhx/dwarfs.git
synced 2025-08-04 02:06:22 -04:00
refactor(safe_main): use const ref for std::function
This commit is contained in:
parent
cfcd456c76
commit
ba0bdbdc91
@ -25,6 +25,6 @@
|
||||
|
||||
namespace dwarfs::tool {
|
||||
|
||||
int safe_main(std::function<int(void)> fn);
|
||||
int safe_main(std::function<int(void)> const& fn);
|
||||
|
||||
} // namespace dwarfs::tool
|
||||
|
@ -29,7 +29,7 @@
|
||||
|
||||
namespace dwarfs::tool {
|
||||
|
||||
int safe_main(std::function<int(void)> fn) {
|
||||
int safe_main(std::function<int(void)> const& fn) {
|
||||
try {
|
||||
install_signal_handlers();
|
||||
setup_default_locale();
|
||||
|
Loading…
x
Reference in New Issue
Block a user