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