mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-24 16:40:21 +00:00
sql: Work around Clang 17/18 run-time call to consteval
function
There was an issue with Clang that causes `consteval` function calls from default initializers of fields to be made at run-time. This manifested itself in the case of `ByteString::formatted` as an undefined reference to `check_format_parameter_consistency` once format string checking was enabled for Clang builds. The workaround is simple (just move it to the member initializer list), and unblocks a useful change.
This commit is contained in:
parent
ca806a3e18
commit
9d3b73743e
Notes:
sideshowbarker
2024-07-17 03:00:02 +09:00
Author: https://github.com/BertalanD Commit: https://github.com/SerenityOS/serenity/commit/9d3b73743e Pull-request: https://github.com/SerenityOS/serenity/pull/24400 Reviewed-by: https://github.com/ADKaster ✅
1 changed files with 3 additions and 2 deletions
|
@ -26,7 +26,8 @@
|
|||
class SQLRepl {
|
||||
public:
|
||||
explicit SQLRepl(Core::EventLoop& loop, ByteString const& database_name, NonnullRefPtr<SQL::SQLClient> sql_client)
|
||||
: m_sql_client(move(sql_client))
|
||||
: m_history_path(ByteString::formatted("{}/.sql-history", Core::StandardPaths::home_directory()))
|
||||
, m_sql_client(move(sql_client))
|
||||
, m_loop(loop)
|
||||
{
|
||||
m_editor = Line::Editor::construct();
|
||||
|
@ -147,7 +148,7 @@ public:
|
|||
}
|
||||
|
||||
private:
|
||||
ByteString m_history_path { ByteString::formatted("{}/.sql-history", Core::StandardPaths::home_directory()) };
|
||||
ByteString m_history_path;
|
||||
RefPtr<Line::Editor> m_editor { nullptr };
|
||||
int m_repl_line_level { 0 };
|
||||
bool m_keep_running { true };
|
||||
|
|
Loading…
Reference in a new issue