mirror of https://github.com/tstack/lnav.git
[cross] try to fix armhf
Defect Number: Reviewed By: Testing Done:
This commit is contained in:
parent
6ec90c521b
commit
7763d2db7a
|
@ -1391,21 +1391,21 @@ void external_log_format::build(std::vector<std::string> &errors) {
|
|||
|
||||
auto value_iter = this->elf_value_defs.find(name);
|
||||
if (value_iter != this->elf_value_defs.end()) {
|
||||
auto &vd = *value_iter->second;
|
||||
auto vd = value_iter->second;
|
||||
indexed_value_def ivd;
|
||||
|
||||
ivd.ivd_index = name_iter->index();
|
||||
if (!vd.vd_unit_field.empty()) {
|
||||
if (!vd->vd_unit_field.empty()) {
|
||||
ivd.ivd_unit_field_index = pat.p_pcre->name_index(
|
||||
vd.vd_unit_field.get());
|
||||
vd->vd_unit_field.get());
|
||||
}
|
||||
else {
|
||||
ivd.ivd_unit_field_index = -1;
|
||||
}
|
||||
if (!vd.vd_internal && vd.vd_column == -1) {
|
||||
vd.vd_column = this->elf_column_count++;
|
||||
if (!vd->vd_internal && vd->vd_column == -1) {
|
||||
vd->vd_column = this->elf_column_count++;
|
||||
}
|
||||
ivd.ivd_value_def = value_iter->second.get();
|
||||
ivd.ivd_value_def = vd;
|
||||
pat.p_value_by_index.push_back(ivd);
|
||||
}
|
||||
}
|
||||
|
@ -1414,10 +1414,10 @@ void external_log_format::build(std::vector<std::string> &errors) {
|
|||
|
||||
for (int lpc = 0; lpc < (int)pat.p_value_by_index.size(); lpc++) {
|
||||
auto &ivd = pat.p_value_by_index[lpc];
|
||||
auto &vd = *ivd.ivd_value_def;
|
||||
auto vd = ivd.ivd_value_def;
|
||||
|
||||
if (!vd.vd_foreign_key && !vd.vd_identifier) {
|
||||
switch (vd.vd_kind) {
|
||||
if (!vd->vd_foreign_key && !vd->vd_identifier) {
|
||||
switch (vd->vd_kind) {
|
||||
case logline_value::VALUE_INTEGER:
|
||||
case logline_value::VALUE_FLOAT:
|
||||
pat.p_numeric_value_indexes.push_back(lpc);
|
||||
|
@ -1871,6 +1871,8 @@ public:
|
|||
continue;
|
||||
}
|
||||
|
||||
require(0 <= vd->vd_column && vd->vd_column < elf.elf_column_count);
|
||||
|
||||
cols[vd->vd_column].vc_name = vd->vd_name.get();
|
||||
cols[vd->vd_column].vc_type = type_pair.first;
|
||||
cols[vd->vd_column].vc_subtype = type_pair.second;
|
||||
|
|
|
@ -42,6 +42,7 @@
|
|||
#include <set>
|
||||
#include <list>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
#include <limits>
|
||||
#include <memory>
|
||||
|
@ -853,45 +854,35 @@ public:
|
|||
};
|
||||
|
||||
struct value_def {
|
||||
value_def() :
|
||||
vd_kind(logline_value::VALUE_UNKNOWN),
|
||||
vd_identifier(false),
|
||||
vd_foreign_key(false),
|
||||
vd_column(-1),
|
||||
vd_values_index(-1),
|
||||
vd_hidden(false),
|
||||
vd_user_hidden(false),
|
||||
vd_internal(false) {
|
||||
|
||||
};
|
||||
|
||||
intern_string_t vd_name;
|
||||
logline_value::kind_t vd_kind;
|
||||
logline_value::kind_t vd_kind{logline_value::VALUE_UNKNOWN};
|
||||
std::string vd_collate;
|
||||
bool vd_identifier;
|
||||
bool vd_foreign_key;
|
||||
bool vd_identifier{false};
|
||||
bool vd_foreign_key{false};
|
||||
intern_string_t vd_unit_field;
|
||||
std::map<const intern_string_t, scaling_factor> vd_unit_scaling;
|
||||
int vd_column;
|
||||
ssize_t vd_values_index;
|
||||
bool vd_hidden;
|
||||
bool vd_user_hidden;
|
||||
bool vd_internal;
|
||||
int vd_column{-1};
|
||||
ssize_t vd_values_index{-1};
|
||||
bool vd_hidden{false};
|
||||
bool vd_user_hidden{false};
|
||||
bool vd_internal{false};
|
||||
std::vector<std::string> vd_action_list;
|
||||
std::string vd_rewriter;
|
||||
std::string vd_description;
|
||||
};
|
||||
|
||||
struct indexed_value_def {
|
||||
indexed_value_def(int index = -1, int unit_index = -1, value_def *vd = NULL)
|
||||
indexed_value_def(int index = -1,
|
||||
int unit_index = -1,
|
||||
std::shared_ptr<value_def> vd = nullptr)
|
||||
: ivd_index(index),
|
||||
ivd_unit_field_index(unit_index),
|
||||
ivd_value_def(vd) {
|
||||
ivd_value_def(std::move(vd)) {
|
||||
}
|
||||
|
||||
int ivd_index;
|
||||
int ivd_unit_field_index;
|
||||
const struct value_def *ivd_value_def;
|
||||
std::shared_ptr<value_def> ivd_value_def;
|
||||
|
||||
bool operator<(const indexed_value_def &rhs) const {
|
||||
return this->ivd_index < rhs.ivd_index;
|
||||
|
|
Loading…
Reference in New Issue