Skip to content

Commit

Permalink
Fix compiler error and test error
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanFreeman committed Jan 22, 2025
1 parent 214334f commit 7b195b1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion include/swoole_coroutine.h
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ class Coroutine {
#ifdef SW_USE_THREAD_CONTEXT
try {
return (new Coroutine(fn, args))->run();
} catch (const std::system_error &e) {
} catch (const std::system_error& e) {
swoole_set_last_error(e.code().value());
swoole_warning("failed to create coroutine, Error: %s[%d]", e.what(), swoole_get_last_error());
return -1;
Expand Down
2 changes: 1 addition & 1 deletion src/os/async_thread.cc
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ void ThreadPool::create_thread(const bool is_core_worker) {
try {
std::thread *_thread = new std::thread([this, is_core_worker]() { main_func(is_core_worker); });
threads[_thread->get_id()] = _thread;
} catch (const std::system_error &e) {
} catch (const std::system_error& e) {
swoole_sys_notice("create aio thread failed, please check your system configuration or adjust aio_worker_num");
return;
}
Expand Down
2 changes: 1 addition & 1 deletion tests/swoole_thread/map2array.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use Swoole\Thread\Map;

require __DIR__ . '/../include/bootstrap.php';

$LURDATE = new Map;
$LURDATE = new Map();
$time = 'abc';
$LURDATE[$time] = new Map(["saaa" => 1111]);
$ls = $LURDATE[$time]->toArray();
Expand Down

0 comments on commit 7b195b1

Please sign in to comment.