改到一半 3D崩溃
This commit is contained in:
+3
-4
@@ -1,5 +1,5 @@
|
||||
#include "Mcp_Server.hpp"
|
||||
#include <render_common.hpp>
|
||||
#include <task_flow/src/Task_Runtime.hpp>
|
||||
#include <charconv>
|
||||
#include <cstdint>
|
||||
#include <iostream>
|
||||
@@ -13,8 +13,7 @@ namespace {
|
||||
if (argc != 3 || std::string_view{argv[1]} != "--port") return 0;
|
||||
unsigned value{};
|
||||
const std::string_view text{argv[2]};
|
||||
const auto [end, error] = std::from_chars(
|
||||
text.data(), text.data() + text.size(), value);
|
||||
const auto [end, error] = std::from_chars(text.data(), text.data() + text.size(), value);
|
||||
if (error != std::errc{} || end != text.data() + text.size() ||
|
||||
value == 0 || value > 65535)
|
||||
return 0;
|
||||
@@ -26,7 +25,7 @@ namespace {
|
||||
int main(int argc, char** argv) {
|
||||
const auto port = parse_port(argc, argv);
|
||||
if (port == 0) return 2;
|
||||
aethera::initialize_runtime({});
|
||||
if (aethera::initialize_task_runtime() != aethera::Initialize_Task_Runtime_Result::initialized) return 3;
|
||||
std::cout << "Aethera MCP http://127.0.0.1:" << port << "/mcp\n";
|
||||
return aethera::mcp::run_mcp_server(port);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user