From: Francois Fleuret Date: Tue, 2 Aug 2011 21:40:23 +0000 (+0200) Subject: Added the -pedantic compilation option, removed a ';'. X-Git-Url: https://fleuret.org/cgi-bin/gitweb/gitweb.cgi?a=commitdiff_plain;h=6041286f817ecd687b5e4186366a0953fd31ee85;p=mappings.git Added the -pedantic compilation option, removed a ';'. --- diff --git a/Makefile b/Makefile index 983d12f..591e7e1 100644 --- a/Makefile +++ b/Makefile @@ -17,10 +17,10 @@ ######################################################################### ifeq ($(DEBUG),yes) - CXXFLAGS = -Wall -g + CXXFLAGS = -Wall -pedantic -O3 -g else # Optimized compilation - CXXFLAGS = -Wall -ffast-math -fcaller-saves -finline-functions -funroll-all-loops -O3 + CXXFLAGS = -Wall -pedantic -O3 endif all: main @@ -31,4 +31,7 @@ main: main.cc mappings.o Makefile.depend: *.h *.cc Makefile $(CC) -M *.cc > Makefile.depend +clean: + rm -f *.o main + -include Makefile.depend diff --git a/README b/README index 5f964cf..e3d2001 100644 --- a/README +++ b/README @@ -28,4 +28,4 @@ one. Francois Fleuret May 2001 -Modified 2005, 2007 +Modified 2005, 2007, 2011 diff --git a/mappings.cc b/mappings.cc index 236ae15..f5b6be4 100644 --- a/mappings.cc +++ b/mappings.cc @@ -177,7 +177,7 @@ Mapping &Mapping::operator = (const Mapping &m) { } float Mapping::operator () (float x) const { return f->eval(x); } -Mapping Mapping::derivative() const { return Mapping(f->derivative()); }; +Mapping Mapping::derivative() const { return Mapping(f->derivative()); } Mapping Mapping::compose(const Mapping &m) const { return Mapping(f->compose(m.f)); } Mapping Mapping::add(const Mapping &m) const { return Mapping(new Sum(f, m.f)); }