diff options
author | rubidium42 <rubidium@openttd.org> | 2021-04-30 15:38:22 +0200 |
---|---|---|
committer | rubidium42 <rubidium42@users.noreply.github.com> | 2021-05-01 19:36:22 +0200 |
commit | 22720332eb9922e20148c7aae1127f7304f6f7d3 (patch) | |
tree | 0efbcfac24474a10f88f956c1f4721cdd7af97e0 /src/safeguards.h | |
parent | 0eb17a70af86d11e49d9560088900c9d65cb07c1 (diff) | |
download | openttd-22720332eb9922e20148c7aae1127f7304f6f7d3.tar.xz |
Codechange: encapsulate network error handling
Diffstat (limited to 'src/safeguards.h')
-rw-r--r-- | src/safeguards.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/safeguards.h b/src/safeguards.h index e3d6c4a3e..aca461175 100644 --- a/src/safeguards.h +++ b/src/safeguards.h @@ -70,15 +70,15 @@ #endif #if defined(NETWORK_CORE_OS_ABSTRACTION_H) && defined(_WIN32) -/* Use NetworkGetLastError() instead of errno, or do not (indirectly) include network/core/os_abstraction.h. - * Winsock does not set errno, but one should rather call WSAGetLastError. NetworkGetLastError abstracts that away. */ +/* Use NetworkError::GetLast() instead of errno, or do not (indirectly) include network/core/os_abstraction.h. + * Winsock does not set errno, but one should rather call WSAGetLastError. NetworkError::GetLast abstracts that away. */ #ifdef errno #undef errno #endif #define errno SAFEGUARD_DO_NOT_USE_THIS_METHOD -/* Use NetworkGetLastErrorString() instead of strerror, or do not (indirectly) include network/core/os_abstraction.h. - * Winsock errors are not handled by strerror, but one should rather call FormatMessage. NetworkGetLastErrorString abstracts that away. */ +/* Use NetworkError::AsString() instead of strerror, or do not (indirectly) include network/core/os_abstraction.h. + * Winsock errors are not handled by strerror, but one should rather call FormatMessage. NetworkError::AsString abstracts that away. */ #define strerror SAFEGUARD_DO_NOT_USE_THIS_METHOD #endif /* defined(NETWORK_CORE_OS_ABSTRACTION_H) && defined(_WIN32) */ |