equal
deleted
inserted
replaced
1 /* $Id:$ */ |
1 /* $Id$ */ |
2 |
2 |
3 /** @file dbg_helpers.h */ |
3 /** @file dbg_helpers.h */ |
4 |
4 |
5 #ifndef DBG_HELPERS |
5 #ifndef DBG_HELPERS |
6 #define DBG_HELPERS |
6 #define DBG_HELPERS |
65 if (value == val_inv) { |
65 if (value == val_inv) { |
66 out = name_inv; |
66 out = name_inv; |
67 } else if (value == 0) { |
67 } else if (value == 0) { |
68 out = "<none>"; |
68 out = "<none>"; |
69 } else { |
69 } else { |
70 for (int i = 0; i < ArrayT<T>::length; i++) { |
70 for (size_t i = 0; i < ArrayT<T>::length; i++) { |
71 if ((value & (1 << i)) == 0) continue; |
71 if ((value & (1 << i)) == 0) continue; |
72 out.AddFormat("%s%s", (out.Size() > 0 ? "+" : ""), t[i]); |
72 out.AddFormat("%s%s", (out.Size() > 0 ? "+" : ""), t[i]); |
73 value &= ~(E)(1 << i); |
73 value &= ~(E)(1 << i); |
74 } |
74 } |
75 if (value != 0) out.AddFormat("%s%s", (out.Size() > 0 ? "+" : ""), t_unk); |
75 if (value != 0) out.AddFormat("%s%s", (out.Size() > 0 ? "+" : ""), t_unk); |