Skip to content

Commit

Permalink
xrCore: errno_t -> int.
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaffeine committed Nov 6, 2015
1 parent 6f95867 commit b94e8b9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/xrCore/FS.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ bool file_handle_internal(LPCSTR file_name, u32& size, int& hFile)
return (true);
}
#else // EDITOR
static errno_t open_internal(LPCSTR fn, int& handle)
static int open_internal(LPCSTR fn, int& handle)
{
return (
_sopen_s(
Expand Down
12 changes: 6 additions & 6 deletions src/xrCore/_std_extensions.h
Original file line number Diff line number Diff line change
Expand Up @@ -206,12 +206,12 @@ IC int xr_strcmp(const char* S1, const char* S2)
#ifndef _EDITOR
#ifndef MASTER_GOLD

inline errno_t xr_strcpy(LPSTR destination, size_t const destination_size, LPCSTR source)
inline int xr_strcpy(LPSTR destination, size_t const destination_size, LPCSTR source)
{
return strcpy_s(destination, destination_size, source);
}

inline errno_t xr_strcat(LPSTR destination, size_t const buffer_size, LPCSTR source)
inline int xr_strcat(LPSTR destination, size_t const buffer_size, LPCSTR source)
{
return strcat_s(destination, buffer_size, source);
}
Expand All @@ -232,12 +232,12 @@ inline int __cdecl xr_sprintf(char(&destination)[count], LPCSTR format_string, .
}
#else // #ifndef MASTER_GOLD

inline errno_t xr_strcpy(LPSTR destination, size_t const destination_size, LPCSTR source)
inline int xr_strcpy(LPSTR destination, size_t const destination_size, LPCSTR source)
{
return strncpy_s(destination, destination_size, source, destination_size);
}

inline errno_t xr_strcat(LPSTR destination, size_t const buffer_size, LPCSTR source)
inline int xr_strcat(LPSTR destination, size_t const buffer_size, LPCSTR source)
{
size_t const destination_length = xr_strlen(destination);
LPSTR i = destination + destination_length;
Expand Down Expand Up @@ -271,13 +271,13 @@ inline int __cdecl xr_sprintf(char(&destination)[count], LPCSTR format_string, .
# pragma deprecated( strcpy, strcpy_s, sprintf, sprintf_s, strcat, strcat_s )

template <int count>
inline errno_t xr_strcpy(char(&destination)[count], LPCSTR source)
inline int xr_strcpy(char(&destination)[count], LPCSTR source)
{
return xr_strcpy(destination, count, source);
}

template <int count>
inline errno_t xr_strcat(char(&destination)[count], LPCSTR source)
inline int xr_strcat(char(&destination)[count], LPCSTR source)
{
return xr_strcat(destination, count, source);
}
Expand Down
2 changes: 1 addition & 1 deletion src/xrCore/xrDebugNew.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -792,7 +792,7 @@ static void invalid_parameter_handler(
string4096 function_;
string4096 file_;
size_t converted_chars = 0;
// errno_t err =
// int err =
if (expression)
wcstombs_s(
&converted_chars,
Expand Down

0 comments on commit b94e8b9

Please sign in to comment.