Skip to content

Commit

Permalink
Fix compilation on Windows with MSVC compiler.
Browse files Browse the repository at this point in the history
  • Loading branch information
sletz committed Feb 27, 2023
1 parent 0db35e1 commit 8380fe0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion compiler/utils/names.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
*
**/

#include <algorithm>

#include "names.hh"
#include "Text.hh"
#include "doc_Text.hh"
Expand Down Expand Up @@ -55,7 +57,7 @@ void setDefNameProperty(Tree t, const string& name)
{
// cerr << "setDefNameProperty : " << name << " FOR " << t << "#" << boxpp(t) << endl;
int n = (int)name.size();
int m = std::min(1023, gGlobal->gMaxNameSize);
int m = std::min<int>(1023, gGlobal->gMaxNameSize);

if (n > m) {
// the name is too long we reduce it to 2/3 of maxsize
Expand Down

0 comments on commit 8380fe0

Please sign in to comment.