mirror of
https://github.com/rizinorg/cutter.git
synced 2024-12-22 04:46:11 +00:00
20 lines
338 B
C
20 lines
338 B
C
|
|
||
|
#ifndef CUTTER_JSON_H
|
||
|
#define CUTTER_JSON_H
|
||
|
|
||
|
#include "Cutter.h"
|
||
|
|
||
|
#include <QJsonValue>
|
||
|
|
||
|
static inline RVA JsonValueGetRVA(const QJsonValue &value, RVA defaultValue = RVA_INVALID)
|
||
|
{
|
||
|
bool ok;
|
||
|
RVA ret = value.toVariant().toULongLong(&ok);
|
||
|
if (!ok) {
|
||
|
return defaultValue;
|
||
|
}
|
||
|
return ret;
|
||
|
}
|
||
|
|
||
|
#endif //CUTTER_JSON_H
|