OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef BASE_LOGGING_H_ | 5 #ifndef BASE_LOGGING_H_ |
6 #define BASE_LOGGING_H_ | 6 #define BASE_LOGGING_H_ |
7 | 7 |
8 #include <cassert> | 8 #include <cassert> |
9 #include <string> | 9 #include <string> |
10 #include <cstring> | 10 #include <cstring> |
(...skipping 962 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
973 // TODO, figure out how to generate a warning | 973 // TODO, figure out how to generate a warning |
974 #define NOTIMPLEMENTED() COMPILE_ASSERT(false, NOT_IMPLEMENTED) | 974 #define NOTIMPLEMENTED() COMPILE_ASSERT(false, NOT_IMPLEMENTED) |
975 #elif NOTIMPLEMENTED_POLICY == 2 | 975 #elif NOTIMPLEMENTED_POLICY == 2 |
976 #define NOTIMPLEMENTED() COMPILE_ASSERT(false, NOT_IMPLEMENTED) | 976 #define NOTIMPLEMENTED() COMPILE_ASSERT(false, NOT_IMPLEMENTED) |
977 #elif NOTIMPLEMENTED_POLICY == 3 | 977 #elif NOTIMPLEMENTED_POLICY == 3 |
978 #define NOTIMPLEMENTED() NOTREACHED() | 978 #define NOTIMPLEMENTED() NOTREACHED() |
979 #elif NOTIMPLEMENTED_POLICY == 4 | 979 #elif NOTIMPLEMENTED_POLICY == 4 |
980 #define NOTIMPLEMENTED() LOG(ERROR) << NOTIMPLEMENTED_MSG | 980 #define NOTIMPLEMENTED() LOG(ERROR) << NOTIMPLEMENTED_MSG |
981 #elif NOTIMPLEMENTED_POLICY == 5 | 981 #elif NOTIMPLEMENTED_POLICY == 5 |
982 #define NOTIMPLEMENTED() do {\ | 982 #define NOTIMPLEMENTED() do {\ |
983 static int count = 0;\ | 983 static int count = 0;\ |
jar (doing other things)
2013/02/13 01:49:40
nit: how about changing this to:
static bool ran_
| |
984 LOG_IF(ERROR, 0 == count++) << NOTIMPLEMENTED_MSG;\ | 984 LOG_IF(ERROR, 0 == count++) << NOTIMPLEMENTED_MSG;\ |
985 } while(0) | 985 } while(0);\ |
986 EAT_STREAM_PARAMETERS | |
986 #endif | 987 #endif |
987 | 988 |
988 #endif // BASE_LOGGING_H_ | 989 #endif // BASE_LOGGING_H_ |
OLD | NEW |