Canvas windows, settings and manager: share view code and list I/O
- CanvasView base holds checker pan sync, zoom step, grid panel, view buttons and view context menu - frame_parent_model_get replaces five root/group transform compositions - Canvas builds VAOs through one helper, unifies uniform setters and frees the texture VAO/VBO/EBO (leak fix) - Settings load/save loop over component suffix tables; unused settings Type enum removed - Manager shares one path-list load/save for recent and autosave files - Anonymous namespaces removed per project style Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
a4638a422d
commit
ec72a30ce0
16 files changed
+558
-814
No files matched your search
+17
-20
@@ -5,30 +5,27 @@
|
||||
|
||||
namespace anm2ed
|
||||
{
|
||||
namespace
|
||||
#ifdef _WIN32
|
||||
struct WSAInitializer
|
||||
{
|
||||
WSAInitializer()
|
||||
{
|
||||
WSADATA data{};
|
||||
WSAStartup(MAKEWORD(2, 2), &data);
|
||||
}
|
||||
~WSAInitializer() { WSACleanup(); }
|
||||
};
|
||||
|
||||
WSAInitializer initializer{};
|
||||
#endif
|
||||
|
||||
int socket_last_error()
|
||||
{
|
||||
#ifdef _WIN32
|
||||
struct WSAInitializer
|
||||
{
|
||||
WSAInitializer()
|
||||
{
|
||||
WSADATA data{};
|
||||
WSAStartup(MAKEWORD(2, 2), &data);
|
||||
}
|
||||
~WSAInitializer() { WSACleanup(); }
|
||||
};
|
||||
|
||||
WSAInitializer initializer{};
|
||||
#endif
|
||||
|
||||
int socket_last_error()
|
||||
{
|
||||
#ifdef _WIN32
|
||||
return WSAGetLastError();
|
||||
return WSAGetLastError();
|
||||
#else
|
||||
return errno;
|
||||
return errno;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
Socket::Socket() : handle(SOCKET_INVALID), role(CLIENT), lastError(0) {}
|
||||
|
||||
Reference in new issue
Block a user