Skip to content

Commit

Permalink
Fix tools build under C++17
Browse files Browse the repository at this point in the history
  • Loading branch information
kaetemi committed Feb 24, 2023
1 parent 2d69e41 commit 1602eda
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
#include "extract_warnings.h"
#include <stdio.h>
#include <string>
using namespace std;

#include "nel/misc/mem_displayer.h"
#include "nel/misc/app_context.h"
Expand All @@ -39,6 +38,7 @@ using namespace std;

#include <windows.h>

using namespace std;

BOOL APIENTRY DllMain( HANDLE hModule,
DWORD ul_reason_for_call,
Expand Down
8 changes: 7 additions & 1 deletion ryzom/tools/assoc_mem/tree.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
#ifndef NL_TREE_H_
#define NL_TREE_H_

#include "nel/misc/types_nl.h"

#include <vector>
#include <map>
#include "record.h"
Expand All @@ -33,7 +35,11 @@ class CTree

public:

struct greater : public std::binary_function<std::pair<double,int> , std::pair<double,int> , bool> {
struct greater
#ifndef NL_CPP17
: public std::binary_function<std::pair<double,int> , std::pair<double,int> , bool>
#endif
{
bool operator()(std::pair<double,int> x, std::pair<double,int> y) const
{
return x.first > y.first;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@ vector<string> Filters;


// always true predicate
struct TAllPrimitivePredicate : public std::unary_function<IPrimitive*, bool>
struct TAllPrimitivePredicate
#ifndef NL_CPP17
: public std::unary_function<IPrimitive*, bool>
#endif
{
bool operator () (IPrimitive *prim)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1156,7 +1156,10 @@ bool strtokquote(const vector<string> &src, VectorType &tokens)
return true;
}

struct TFindParamPred : std::unary_function<CPhrase::TParamInfo, bool>
struct TFindParamPred
#ifndef NL_CPP17
: std::unary_function<CPhrase::TParamInfo, bool>
#endif
{
string Name;
TFindParamPred(const std::string &name)
Expand Down
5 changes: 4 additions & 1 deletion ryzom/tools/translation_tools/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -822,7 +822,10 @@ int mergeStringDiff(int argc, char *argv[], const std::string &baseName)


/*
struct TFindPhrase : unary_function<TPhrase, bool>
struct TFindPhrase
#ifndef NL_CPP17
: unary_function<TPhrase, bool>
#endif
{
string Identifier;
TFindPhrase (const string &identifier)
Expand Down

0 comments on commit 1602eda

Please sign in to comment.