mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-10-18 19:43:24 +03:00
* UIInspector now stores move-only event connections in a node-based map, avoiding the MSVC vector copy error.
* Batch results now initialize as a JSON object. The previous initialization created an array, causing both reported Linux and macOS test failures.
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
#include <eepp/ui/uiscenenode.hpp>
|
||||
#include <eepp/ui/uiwidget.hpp>
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
|
||||
namespace EE { namespace UI {
|
||||
|
||||
@@ -48,7 +49,9 @@ class EE_API UIInspector {
|
||||
Scene::Node* node{ nullptr };
|
||||
Scene::EventConnection close;
|
||||
};
|
||||
using NodeHandles = UnorderedMap<std::string, NodeEntry>;
|
||||
// EventConnection is move-only; keep these entries in a node-based map so map operations do not
|
||||
// require copying the connection through the dense map's vector storage.
|
||||
using NodeHandles = std::unordered_map<std::string, NodeEntry>;
|
||||
using ReverseNodeHandles = UnorderedMap<Scene::Node*, std::string>;
|
||||
|
||||
std::string registerNode( Scene::Node* node, const char* prefix, NodeHandles& handles,
|
||||
|
||||
@@ -192,7 +192,7 @@ struct UIInspectorServer::Impl {
|
||||
Uint64 client;
|
||||
json id;
|
||||
json commands;
|
||||
json results{ json::object() };
|
||||
json results = json::object();
|
||||
std::map<std::string, json> named;
|
||||
size_t index{ 0 };
|
||||
unsigned frames{ 0 };
|
||||
|
||||
Reference in New Issue
Block a user