|
Last change
on this file since 14 was
12,
checked in by landauf, 18 years ago
|
|
added boost
|
-
Property svn:executable set to
*
|
|
File size:
1.0 KB
|
| Line | |
|---|
| 1 | // minmax_check header -------------------------------------------------------// |
|---|
| 2 | |
|---|
| 3 | // Copyright Beman Dawes 2002 |
|---|
| 4 | // Copyright Rene Rivera 2004. |
|---|
| 5 | // Distributed under the Boost Software License, Version 1.0. |
|---|
| 6 | // (See accompanying file LICENSE_1_0.txt or copy at |
|---|
| 7 | // http://www.boost.org/LICENSE_1_0.txt) |
|---|
| 8 | |
|---|
| 9 | #ifndef BOOST_MINMAX_CHECK_HPP |
|---|
| 10 | #define BOOST_MINMAX_CHECK_HPP |
|---|
| 11 | |
|---|
| 12 | #include "inspector.hpp" |
|---|
| 13 | |
|---|
| 14 | namespace boost |
|---|
| 15 | { |
|---|
| 16 | namespace inspect |
|---|
| 17 | { |
|---|
| 18 | class minmax_check : public inspector |
|---|
| 19 | { |
|---|
| 20 | long m_errors; |
|---|
| 21 | |
|---|
| 22 | public: |
|---|
| 23 | |
|---|
| 24 | minmax_check(); |
|---|
| 25 | virtual const char * name() const { return "minmax-check"; } |
|---|
| 26 | virtual const char * desc() const { return "uses of min and max that have not been protected from the min/max macros"; } |
|---|
| 27 | |
|---|
| 28 | virtual void inspect( |
|---|
| 29 | const std::string & library_name, |
|---|
| 30 | const path & full_path, |
|---|
| 31 | const std::string & contents); |
|---|
| 32 | |
|---|
| 33 | virtual ~minmax_check() |
|---|
| 34 | { |
|---|
| 35 | std::cout << " " << m_errors << " violations of the Boost min/max guidelines\n"; |
|---|
| 36 | } |
|---|
| 37 | }; |
|---|
| 38 | } |
|---|
| 39 | } |
|---|
| 40 | |
|---|
| 41 | #endif // BOOST_MINMAX_CHECK_HPP |
|---|
Note: See
TracBrowser
for help on using the repository browser.