Skip to content

Commit

Permalink
common : fix MSVC M_PI ..
Browse files Browse the repository at this point in the history
  • Loading branch information
ggerganov committed Feb 8, 2023
1 parent 8315941 commit 142891f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions examples/common.cpp
Expand Up @@ -8,6 +8,10 @@
#include <cmath>
#include <regex>

#ifndef M_PI
#define M_PI 3.14159265358979323846
#endif

std::string trim(const std::string & s) {
std::regex e("^\\s+|\\s+$");
return std::regex_replace(s, e, "");
Expand Down

0 comments on commit 142891f

Please sign in to comment.