code brush
This commit is contained in:
@@ -188,15 +188,13 @@ bool cmp_func_name_a(const PIIntrospectionContainers::TypeInfo & t0, const PIInt
|
|||||||
bool cmp_func_name_d(const PIIntrospectionContainers::TypeInfo & t0, const PIIntrospectionContainers::TypeInfo & t1) {
|
bool cmp_func_name_d(const PIIntrospectionContainers::TypeInfo & t0, const PIIntrospectionContainers::TypeInfo & t1) {
|
||||||
return !cmp_func_name_a(t0, t1);
|
return !cmp_func_name_a(t0, t1);
|
||||||
}
|
}
|
||||||
void print_func_name(const PIIntrospectionContainers::TypeInfo & t) {qDebug() << PI2QString(t.name);}
|
|
||||||
# define CMP_FUNC(field) \
|
# define CMP_FUNC(field) \
|
||||||
bool cmp_func_##field##_a(const PIIntrospectionContainers::TypeInfo & t0, const PIIntrospectionContainers::TypeInfo & t1) { \
|
bool cmp_func_##field##_a(const PIIntrospectionContainers::TypeInfo & t0, const PIIntrospectionContainers::TypeInfo & t1) { \
|
||||||
return t0.field < t1.field; \
|
return t0.field < t1.field; \
|
||||||
} \
|
} \
|
||||||
bool cmp_func_##field##_d(const PIIntrospectionContainers::TypeInfo & t0, const PIIntrospectionContainers::TypeInfo & t1) { \
|
bool cmp_func_##field##_d(const PIIntrospectionContainers::TypeInfo & t0, const PIIntrospectionContainers::TypeInfo & t1) { \
|
||||||
return t0.field > t1.field; \
|
return t0.field > t1.field; \
|
||||||
} \
|
}
|
||||||
void print_func_##field(const PIIntrospectionContainers::TypeInfo & t) {qDebug() << t.field;}
|
|
||||||
#else
|
#else
|
||||||
int cmp_func_name_a(const PIIntrospectionContainers::TypeInfo * t0, const PIIntrospectionContainers::TypeInfo * t1) {
|
int cmp_func_name_a(const PIIntrospectionContainers::TypeInfo * t0, const PIIntrospectionContainers::TypeInfo * t1) {
|
||||||
return QString::localeAwareCompare(PI2QString(t0->name), PI2QString(t1->name));
|
return QString::localeAwareCompare(PI2QString(t0->name), PI2QString(t1->name));
|
||||||
|
|||||||
Reference in New Issue
Block a user