this->tag_ids = tag_ids;
tag_names = new std::vector<std::string>();
tag_names->resize(tag_ids->size());
- for(auto val : *(this->tag_ids))
- (*this->tag_names)[val.second] = val.first;
+ std::unordered_map<std::string, tag_t>::iterator val;
+ //for(auto val : *(this->tag_ids))
+ //(*this->tag_names)[val.second] = val.first;
+ for(val = this->tag_ids->begin(); val != this->tag_ids->end(); ++val)
+ (*this->tag_names)[val->second] = val->first;
+
uint32_t max_tag = tag_names->size() - 1;
bit_vector *tmp_bitmap = new bit_vector(npar, 1, 0);
i = 0;
else
i = text_positions->rank1(x-1);
-
- j = text_positions->rank1(y);
+ j = text_positions->rank1(y);
// fprintf(stderr, "Rank of node %i is %i, rank of closing %i is %i\n", x, i, y, j);
if (i == j)
return std::make_pair(xml_tree::NIL, xml_tree::NIL);
xml_tree::tag_t xml_tree::register_tag(char *s)
{
- auto found = tag_ids->find(std::string(s));
+ std::unordered_map<std::string, tag_t>::iterator found;
+ found = tag_ids->find(std::string(s));
if (found == tag_ids->end())
return xml_tree::NIL_TAG_ID;
else
unsigned char * orig_text;
unsigned char * current_text;
- auto r = text_id_range(x);
+ std::pair<int32_t, int32_t> r = text_id_range(x);
if (r.first == xml_tree::NIL)
current_text = 0;
else {