Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix MSVC build #479

Merged
merged 4 commits into from
Aug 28, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
examples : fix use of M_PI on MSVC
  • Loading branch information
cebtenzzre committed Aug 26, 2023
commit a42a8d5b345ab7ed28a8e66752d036cce1ded127
6 changes: 2 additions & 4 deletions examples/common.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#define _USE_MATH_DEFINES // for M_PI

#include "common.h"

// third-party utilities
Expand All @@ -13,10 +15,6 @@
#include <codecvt>
#include <sstream>

#ifndef M_PI
#define M_PI 3.14159265358979323846
#endif

#if defined(_MSC_VER)
#pragma warning(disable: 4244 4267) // possible loss of data
#endif
Expand Down
2 changes: 2 additions & 0 deletions examples/sam/main.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#define _USE_MATH_DEFINES // for M_PI

#include "ggml.h"

#include "common.h"
Expand Down