<feed xmlns='http://www.w3.org/2005/Atom'>
<title>eglantine-cirakg/src/common/misc.cpp, branch nx2</title>
<subtitle>Mirror of github.com/cira0100/Eglantine-public nx2, a fork of Djihads80/Eglantine.</subtitle>
<id>https://git.cirakg.xyz/eglantine-cirakg/atom?h=nx2</id>
<link rel='self' href='https://git.cirakg.xyz/eglantine-cirakg/atom?h=nx2'/>
<link rel='alternate' type='text/html' href='https://git.cirakg.xyz/eglantine-cirakg/'/>
<updated>2021-09-11T21:19:14+00:00</updated>
<entry>
<title>common: Move error handling to error.cpp/h</title>
<updated>2021-09-11T21:19:14+00:00</updated>
<author>
<name>Morph</name>
<email>39850852+Morph1984@users.noreply.github.com</email>
</author>
<published>2021-09-08T18:36:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cirakg.xyz/eglantine-cirakg/commit/?id=c0ff1dce0bce53a5e324b9eb77ca7fe3a37f02df'/>
<id>urn:sha1:c0ff1dce0bce53a5e324b9eb77ca7fe3a37f02df</id>
<content type='text'>
This allows us to avoid implicitly including &lt;string&gt; every time common_funcs.h is included.
</content>
</entry>
<entry>
<title>[network] Error handling reform</title>
<updated>2021-02-28T22:25:31+00:00</updated>
<author>
<name>comex</name>
<email>comexk@gmail.com</email>
</author>
<published>2021-01-24T20:17:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cirakg.xyz/eglantine-cirakg/commit/?id=4258b4985a833115899f2607443925cc7cada2f2'/>
<id>urn:sha1:4258b4985a833115899f2607443925cc7cada2f2</id>
<content type='text'>
`network.cpp` has several error paths which either:
- report "Unhandled host socket error=n" and return `SUCCESS`, or
- switch on a few possible errors, log them, and translate them to
  Errno; the same switch statement is copied and pasted in multiple
  places in the code

Convert these paths to use a helper function `GetAndLogLastError`, which
is roughly the equivalent of one of the switch statements, but:
- handling more cases (both ones that were already in `Errno`, and a few
  more I added), and
- using OS functions to convert the error to a string when logging, so
  it'll describe the error even if it's not one of the ones in the
  switch statement.
  - To handle this, refactor the logic in `GetLastErrorMsg` to expose a
    new function `NativeErrorToString` which takes the error number
    explicitly as an argument.  And improve the Windows version a bit.

Also, add a test which exercises two random error paths.
</content>
</entry>
<entry>
<title>General: Make ignoring a discarded return value an error</title>
<updated>2020-10-30T04:13:21+00:00</updated>
<author>
<name>Lioncash</name>
<email>mathew1800@gmail.com</email>
</author>
<published>2020-10-30T03:30:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cirakg.xyz/eglantine-cirakg/commit/?id=0525232875b58c5f231e7f6dd1ac6d523979f863'/>
<id>urn:sha1:0525232875b58c5f231e7f6dd1ac6d523979f863</id>
<content type='text'>
Allows our CI to catch more potential bugs. This also removes the
[[nodiscard]] attribute of IOFile's Open member function. There are
cases where a file may want to be opened, but have the status of it
checked at a later time.
</content>
</entry>
<entry>
<title>Port #4182 from Citra: "Prefix all size_t with std::"</title>
<updated>2018-09-15T13:21:06+00:00</updated>
<author>
<name>fearlessTobi</name>
<email>thm.frey@gmail.com</email>
</author>
<published>2018-09-15T13:21:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cirakg.xyz/eglantine-cirakg/commit/?id=1190ea6ddbbcabca5ac0ee73f940f509888f8673'/>
<id>urn:sha1:1190ea6ddbbcabca5ac0ee73f940f509888f8673</id>
<content type='text'>
</content>
</entry>
<entry>
<title>common/misc: use windows.h</title>
<updated>2018-08-13T20:28:24+00:00</updated>
<author>
<name>Zhu PengFei</name>
<email>zhupengfei321@sina.cn</email>
</author>
<published>2018-08-13T20:28:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cirakg.xyz/eglantine-cirakg/commit/?id=bba0f809c87c59f223c61fa13961530eeb83b30c'/>
<id>urn:sha1:bba0f809c87c59f223c61fa13961530eeb83b30c</id>
<content type='text'>
linux-mingw does not really like this.</content>
</entry>
<entry>
<title>common/misc: Deduplicate code in GetLastErrorMsg()</title>
<updated>2018-07-19T13:15:38+00:00</updated>
<author>
<name>Lioncash</name>
<email>mathew1800@gmail.com</email>
</author>
<published>2018-07-19T13:03:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cirakg.xyz/eglantine-cirakg/commit/?id=03d8c78199204fd4c099d3e9f6462512771213d3'/>
<id>urn:sha1:03d8c78199204fd4c099d3e9f6462512771213d3</id>
<content type='text'>
Android and macOS have supported thread_local for quite a while, but
most importantly is that we don't even really need it. Instead of using
a thread-local buffer, we can just return a non-static buffer as a
std::string, avoiding the need for that quality entirely.
</content>
</entry>
<entry>
<title>Remove empty newlines in #include blocks.</title>
<updated>2016-09-21T02:15:47+00:00</updated>
<author>
<name>Emmanuel Gil Peyrot</name>
<email>linkmauve@linkmauve.fr</email>
</author>
<published>2016-09-20T15:21:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cirakg.xyz/eglantine-cirakg/commit/?id=1138ec0d49352462bf7d3e4500c3a04b33943651'/>
<id>urn:sha1:1138ec0d49352462bf7d3e4500c3a04b33943651</id>
<content type='text'>
This makes clang-format useful on those.

Also add a bunch of forgotten transitive includes, which otherwise
prevented compilation.
</content>
</entry>
<entry>
<title>Sources: Run clang-format on everything.</title>
<updated>2016-09-18T00:38:01+00:00</updated>
<author>
<name>Emmanuel Gil Peyrot</name>
<email>linkmauve@linkmauve.fr</email>
</author>
<published>2016-09-18T00:38:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cirakg.xyz/eglantine-cirakg/commit/?id=628ed4376a14a6da7cea1d60c5fb000773795579'/>
<id>urn:sha1:628ed4376a14a6da7cea1d60c5fb000773795579</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Common: Cleanup memory and misc includes.</title>
<updated>2015-06-27T23:36:54+00:00</updated>
<author>
<name>Emmanuel Gil Peyrot</name>
<email>linkmauve@linkmauve.fr</email>
</author>
<published>2015-06-21T12:12:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cirakg.xyz/eglantine-cirakg/commit/?id=2d044a67c932403b81fdde6f81d461c6e7c11efe'/>
<id>urn:sha1:2d044a67c932403b81fdde6f81d461c6e7c11efe</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Common: Remove common.h</title>
<updated>2015-05-07T18:45:22+00:00</updated>
<author>
<name>Yuri Kunde Schlesner</name>
<email>yuriks@yuriks.net</email>
</author>
<published>2015-05-06T07:06:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cirakg.xyz/eglantine-cirakg/commit/?id=e1fbac3ca13d37d2625c11d30cfdece4327b446b'/>
<id>urn:sha1:e1fbac3ca13d37d2625c11d30cfdece4327b446b</id>
<content type='text'>
</content>
</entry>
</feed>
