Skip to content

Commit

Permalink
windows: remove duplicate strptime definition
Browse files Browse the repository at this point in the history
  • Loading branch information
vgmoose committed Dec 6, 2023
1 parent 2503c42 commit a2e4468
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions src/OSCRepo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,6 @@
using namespace rapidjson;

#ifdef WIN32
// https://stackoverflow.com/a/33542189
extern "C" char* strptime(const char* s,
const char* f,
struct tm* tm)
{
std::istringstream input(s);
input.imbue(std::locale(setlocale(LC_ALL, nullptr)));
input >> std::get_time(tm, f);
if (input.fail())
{
return nullptr;
}
return (char*)(s + input.tellg());
}

// needed for windows.h conflict with rapidjson namespace:
// https://github.com/Tencent/rapidjson/issues/1448
#undef GetObject
Expand Down

0 comments on commit a2e4468

Please sign in to comment.