From 5adaccac915e88e671997fb222607acd1ea8cd80 Mon Sep 17 00:00:00 2001 From: Sam Hocevar Date: Mon, 28 Nov 2011 01:58:51 +0000 Subject: [PATCH] test: make namespace usage less intrusive in math examples. --- test/math/pi.cpp | 6 ++++-- test/math/remez-matrix.h | 2 ++ test/math/remez-solver.h | 2 ++ test/math/remez.cpp | 3 +-- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/test/math/pi.cpp b/test/math/pi.cpp index ca457566..dc5430c9 100644 --- a/test/math/pi.cpp +++ b/test/math/pi.cpp @@ -20,8 +20,10 @@ #include "core.h" -using namespace lol; -using namespace std; +using std::printf; +using std::sqrt; + +using lol::real; int main(int argc, char **argv) { diff --git a/test/math/remez-matrix.h b/test/math/remez-matrix.h index 81ca998e..1832ffd9 100644 --- a/test/math/remez-matrix.h +++ b/test/math/remez-matrix.h @@ -80,6 +80,8 @@ template struct Matrix void print() const { + using std::printf; + for (int j = 0; j < N; j++) { for (int i = 0; i < N; i++) diff --git a/test/math/remez-solver.h b/test/math/remez-solver.h index 58d9e630..a7f7afb0 100644 --- a/test/math/remez-solver.h +++ b/test/math/remez-solver.h @@ -258,6 +258,8 @@ public: void PrintPoly() { + using std::printf; + /* Transform Chebyshev polynomial weights into powers of X^i * in the [-1..1] range. */ real bn[ORDER + 1]; diff --git a/test/math/remez.cpp b/test/math/remez.cpp index 32338fb7..1375a136 100644 --- a/test/math/remez.cpp +++ b/test/math/remez.cpp @@ -21,8 +21,7 @@ #include "core.h" -using namespace lol; -using namespace std; +using lol::real; #include "remez-matrix.h" #include "remez-solver.h"