mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
unneeded stuff
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21619 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
f0fee538c2
commit
a3393e63b8
@ -80,9 +80,9 @@ int const numErrorTags = sizeof(errorTags)/sizeof(error_item);
|
|||||||
lyx_debug_trait::type lyx_debug_trait::value(string const & val)
|
lyx_debug_trait::type lyx_debug_trait::value(string const & val)
|
||||||
{
|
{
|
||||||
type l = Debug::NONE;
|
type l = Debug::NONE;
|
||||||
string v(val);
|
string v = val;
|
||||||
while (!v.empty()) {
|
while (!v.empty()) {
|
||||||
string::size_type const st = v.find(',');
|
size_t const st = v.find(',');
|
||||||
string const tmp(ascii_lowercase(v.substr(0, st)));
|
string const tmp(ascii_lowercase(v.substr(0, st)));
|
||||||
if (tmp.empty())
|
if (tmp.empty())
|
||||||
break;
|
break;
|
||||||
@ -106,7 +106,7 @@ lyx_debug_trait::type lyx_debug_trait::value(string const & val)
|
|||||||
void lyx_debug_trait::showLevel(ostream & os, lyx_debug_trait::type level)
|
void lyx_debug_trait::showLevel(ostream & os, lyx_debug_trait::type level)
|
||||||
{
|
{
|
||||||
// Show what features are traced
|
// Show what features are traced
|
||||||
for (int i = 0; i < numErrorTags ; ++i) {
|
for (int i = 0; i != numErrorTags; ++i) {
|
||||||
if (errorTags[i].level != Debug::ANY
|
if (errorTags[i].level != Debug::ANY
|
||||||
&& errorTags[i].level != Debug::NONE
|
&& errorTags[i].level != Debug::NONE
|
||||||
&& errorTags[i].level & level) {
|
&& errorTags[i].level & level) {
|
||||||
@ -123,7 +123,7 @@ void lyx_debug_trait::showLevel(ostream & os, lyx_debug_trait::type level)
|
|||||||
|
|
||||||
void lyx_debug_trait::showTags(ostream & os)
|
void lyx_debug_trait::showTags(ostream & os)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < numErrorTags ; ++i)
|
for (int i = 0; i != numErrorTags ; ++i)
|
||||||
os << setw(10) << static_cast<unsigned int>(errorTags[i].level)
|
os << setw(10) << static_cast<unsigned int>(errorTags[i].level)
|
||||||
<< setw(13) << errorTags[i].name
|
<< setw(13) << errorTags[i].name
|
||||||
<< " " << to_utf8(_(errorTags[i].desc)) << '\n';
|
<< " " << to_utf8(_(errorTags[i].desc)) << '\n';
|
||||||
|
@ -30,25 +30,6 @@
|
|||||||
# undef DEBUG
|
# undef DEBUG
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
struct debug_trait {
|
|
||||||
enum type {
|
|
||||||
NONE = 0,
|
|
||||||
EMERG = 1,
|
|
||||||
ALERT = 2,
|
|
||||||
CRIT = 3,
|
|
||||||
ERR = 4,
|
|
||||||
WARN = 5,
|
|
||||||
NOTICE = 6,
|
|
||||||
INFO = 7,
|
|
||||||
DEBUG = 8,
|
|
||||||
ANY = 0xffffff
|
|
||||||
};
|
|
||||||
|
|
||||||
static bool match(type a, type b) {
|
|
||||||
return (b <= a || (b == ANY && a > NONE));
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
#ifdef TEMPORARY_DEBUG_MACRO
|
#ifdef TEMPORARY_DEBUG_MACRO
|
||||||
# define DEBUG TEMPORARY_DEBUG_MACRO
|
# define DEBUG TEMPORARY_DEBUG_MACRO
|
||||||
# undef TEMPORARY_DEBUG_MACRO
|
# undef TEMPORARY_DEBUG_MACRO
|
||||||
@ -129,8 +110,6 @@ private:
|
|||||||
bool enabled_;
|
bool enabled_;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef basic_debugstream<debug_trait> debugstream;
|
|
||||||
|
|
||||||
|
|
||||||
//} // namespace lyx
|
//} // namespace lyx
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user