Skip to content

Commit

Permalink
stock/BasicStock: pass std::string_view as name
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxKellermann committed Jan 21, 2025
1 parent e0f63aa commit 5ca7d05
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/stock/BasicStock.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ BasicStock::ClearEventCallback() noexcept
*/

BasicStock::BasicStock(EventLoop &event_loop, StockClass &_cls,
const char *_name, std::size_t _max_idle,
std::string_view _name, std::size_t _max_idle,
Event::Duration _clear_interval) noexcept
:cls(_cls),
name(_name),
Expand Down
2 changes: 1 addition & 1 deletion src/stock/BasicStock.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public:
* the #MapStock class
*/
BasicStock(EventLoop &event_loop, StockClass &cls,
const char *name, std::size_t max_idle,
std::string_view name, std::size_t max_idle,
Event::Duration _clear_interval) noexcept;

~BasicStock() noexcept;
Expand Down
2 changes: 1 addition & 1 deletion src/stock/MultiStock.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ struct MultiStock::MapItem::Waiting final
};

MultiStock::MapItem::MapItem(EventLoop &_event_loop, StockClass &_outer_class,
const char *_name,
std::string_view _name,
std::size_t _limit,
Event::Duration _clear_interval,
MultiStockClass &_inner_class) noexcept
Expand Down
2 changes: 1 addition & 1 deletion src/stock/MultiStock.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ class MultiStock {
IntrusiveListHook<IntrusiveHookMode::AUTO_UNLINK> chronological_siblings;

MapItem(EventLoop &event_loop, StockClass &_outer_class,
const char *_name,
std::string_view _name,
std::size_t _limit,
Event::Duration _clear_interval,
MultiStockClass &_inner_class) noexcept;
Expand Down
2 changes: 1 addition & 1 deletion src/stock/Stock.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ Stock::ScheduleRetryWaiting() noexcept
*/

Stock::Stock(EventLoop &event_loop, StockClass &_cls,
const char *_name, std::size_t _limit, std::size_t _max_idle,
std::string_view _name, std::size_t _limit, std::size_t _max_idle,
Event::Duration _clear_interval) noexcept
:BasicStock(event_loop, _cls, _name,
_max_idle,
Expand Down
2 changes: 1 addition & 1 deletion src/stock/Stock.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public:
* the #MapStock class
*/
Stock(EventLoop &event_loop, StockClass &cls,
const char *name, std::size_t limit, std::size_t max_idle,
std::string_view name, std::size_t limit, std::size_t max_idle,
Event::Duration _clear_interval) noexcept;

~Stock() noexcept;
Expand Down

0 comments on commit 5ca7d05

Please sign in to comment.