Skip to content

Commit

Permalink
Fix MSVC warning C4005: 'NOMINMAX': macro redefinition.
Browse files Browse the repository at this point in the history
  • Loading branch information
BYVoid committed Jul 27, 2024
1 parent 641bfe9 commit 8b632f0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
6 changes: 0 additions & 6 deletions src/SimpleConverter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,6 @@
* limitations under the License.
*/

#ifdef _MSC_VER
#define NOMINMAX
#include <Windows.h>
#undef NOMINMAX
#endif // _MSC_VER

#include "Config.hpp"
#include "Converter.hpp"
#include "UTF8Util.hpp"
Expand Down
3 changes: 2 additions & 1 deletion src/UTF8Util.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@
#pragma once

#ifdef _MSC_VER
#ifndef NOMINMAX
#define NOMINMAX
#endif
#include <Windows.h>
#undef NOMINMAX
#endif // _MSC_VER

#include <cstring>
Expand Down

0 comments on commit 8b632f0

Please sign in to comment.