annotate dep/animia/src/fd.cc @ 187:9613d72b097e

*: multiple performance improvements like marking `static const` when it makes sense... date: change old stupid heap-based method to a structure which should make copying the thing actually make a copy. also many performance-based changes, like removing the std::tie dependency and forward-declaring nlohmann json *: replace every instance of QString::fromUtf8 to Strings::ToQString. the main difference is that our function will always convert exactly what is in the string, while some other times it would only convert up to the nearest NUL byte
author Paper <mrpapersonic@gmail.com>
date Wed, 06 Dec 2023 13:43:54 -0500
parents 54c5d80a737e
children bc1ae1810855 8f6f8dd2eb23
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
146
d8a61e7e2a36 dep/animia: move fd stuff to a new fd.cc, don't force the user
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
1 #include "animia/fd.h"
d8a61e7e2a36 dep/animia: move fd stuff to a new fd.cc, don't force the user
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
2
152
8700806c2cc2 dep/animia: awesome new breaking changes!
Paper <mrpapersonic@gmail.com>
parents: 150
diff changeset
3 #ifdef WIN32
146
d8a61e7e2a36 dep/animia: move fd stuff to a new fd.cc, don't force the user
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
4 # include "animia/fd/win32.h"
166
54c5d80a737e dep/animia: add libutil method
paper@DavesDouble.local
parents: 156
diff changeset
5 #elif defined(LINUX) || defined(FREEBSD)
54c5d80a737e dep/animia: add libutil method
paper@DavesDouble.local
parents: 156
diff changeset
6 # include "animia/fd/proc.h"
153
bd439dd6ffc5 *: make win stuff actually work, rename bsd.cc to xnu.cc
Paper <mrpapersonic@gmail.com>
parents: 152
diff changeset
7 #elif defined(MACOSX)
bd439dd6ffc5 *: make win stuff actually work, rename bsd.cc to xnu.cc
Paper <mrpapersonic@gmail.com>
parents: 152
diff changeset
8 # include "animia/fd/xnu.h"
166
54c5d80a737e dep/animia: add libutil method
paper@DavesDouble.local
parents: 156
diff changeset
9 #elif defined(LIBUTIL)
54c5d80a737e dep/animia: add libutil method
paper@DavesDouble.local
parents: 156
diff changeset
10 # include "animia/fd/libutil.h"
146
d8a61e7e2a36 dep/animia: move fd stuff to a new fd.cc, don't force the user
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
11 #endif
d8a61e7e2a36 dep/animia: move fd stuff to a new fd.cc, don't force the user
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
12
d8a61e7e2a36 dep/animia: move fd stuff to a new fd.cc, don't force the user
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
13 namespace animia::internal {
d8a61e7e2a36 dep/animia: move fd stuff to a new fd.cc, don't force the user
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
14
152
8700806c2cc2 dep/animia: awesome new breaking changes!
Paper <mrpapersonic@gmail.com>
parents: 150
diff changeset
15 #ifdef WIN32
146
d8a61e7e2a36 dep/animia: move fd stuff to a new fd.cc, don't force the user
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
16 win32::Win32FdTools os_fd;
166
54c5d80a737e dep/animia: add libutil method
paper@DavesDouble.local
parents: 156
diff changeset
17 #elif defined(LINUX) || defined(FREEBSD)
54c5d80a737e dep/animia: add libutil method
paper@DavesDouble.local
parents: 156
diff changeset
18 proc::ProcFdTools os_fd;
153
bd439dd6ffc5 *: make win stuff actually work, rename bsd.cc to xnu.cc
Paper <mrpapersonic@gmail.com>
parents: 152
diff changeset
19 #elif defined(MACOSX)
bd439dd6ffc5 *: make win stuff actually work, rename bsd.cc to xnu.cc
Paper <mrpapersonic@gmail.com>
parents: 152
diff changeset
20 xnu::XnuFdTools os_fd;
166
54c5d80a737e dep/animia: add libutil method
paper@DavesDouble.local
parents: 156
diff changeset
21 #elif defined(LIBUTIL)
54c5d80a737e dep/animia: add libutil method
paper@DavesDouble.local
parents: 156
diff changeset
22 libutil::LibutilFdTools os_fd;
146
d8a61e7e2a36 dep/animia: move fd stuff to a new fd.cc, don't force the user
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
23 #else
d8a61e7e2a36 dep/animia: move fd stuff to a new fd.cc, don't force the user
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
24 BaseFdTools os_fd;
d8a61e7e2a36 dep/animia: move fd stuff to a new fd.cc, don't force the user
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
25 #endif
d8a61e7e2a36 dep/animia: move fd stuff to a new fd.cc, don't force the user
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
26
d8a61e7e2a36 dep/animia: move fd stuff to a new fd.cc, don't force the user
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
27 BaseFdTools& fd = os_fd;
d8a61e7e2a36 dep/animia: move fd stuff to a new fd.cc, don't force the user
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
28
156
cdf79282d647 dep/animia: add VERY early x11 window stuff
Paper <mrpapersonic@gmail.com>
parents: 153
diff changeset
29 } // namespace animia::internal