From e8ac579fcbcc942016f09f17be8fec1007d2736c Mon Sep 17 00:00:00 2001 From: Tomasz Sowa Date: Wed, 3 Apr 2024 17:03:50 +0200 Subject: [PATCH] update to the new pikotools api --- .gitignore | 4 ++++ Makefile | 18 ++++++++++++------ lib/finder.cpp | 4 ++-- 3 files changed, 18 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index c03642d..ef2df0f 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,7 @@ data *.o *.a placefinder/placefinder +lookup-dir/ +m +.qtcreator/ +build.sh diff --git a/Makefile b/Makefile index 675a98d..4d3c49e 100644 --- a/Makefile +++ b/Makefile @@ -1,20 +1,26 @@ +ifndef CXX +CXX = g++ +endif -CXX = g++10 -#CXX = clang++ +ifndef CXXFLAGS +CXXFLAGS = -Wfatal-errors -fPIC -Wall -pedantic -O0 -g3 -pthread -std=c++20 -I../../pikotools/src -I../lib -I/usr/local/include +endif -CXXFLAGS = -Wl,-rpath=/usr/local/lib/gcc10 -Wfatal-errors -fPIC -Wall -pedantic -O0 -g3 -pthread -std=c++20 -I../../pikotools/src -I../lib -I/usr/local/include -#CXXFLAGS = -fsanitize=address -Wfatal-errors -fPIC -Wall -pedantic -O0 -g3 -pthread -std=c++20 -I../../pikotools/src -I../lib -I/usr/local/include +ifndef LDFLAGS LDFLAGS = -L/usr/local/lib +endif -#-fsanitize=address - +ifndef AR +AR = ar +endif export CXX export CXXFLAGS export LDFLAGS export AR + all: lib placefinder diff --git a/lib/finder.cpp b/lib/finder.cpp index b51ccf0..92f8f68 100644 --- a/lib/finder.cpp +++ b/lib/finder.cpp @@ -5,7 +5,7 @@ */ /* - * Copyright (c) 2021, Tomasz Sowa + * Copyright (c) 2021-2024, Tomasz Sowa * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -288,7 +288,7 @@ bool Finder::parse_way_childs(pt::Space & out, pt::Space & childs) if( ref ) { out.add(L"node_id", *ref); - long node_id = pt::Tol(ref->c_str()); + long node_id = pt::to_l(ref->c_str()); has_node = get_node(node_id, out); } }