Switch to unified view

a/src/rcldb/expansiondbs.cpp b/src/rcldb/expansiondbs.cpp
...
...
19
#include "autoconfig.h"
19
#include "autoconfig.h"
20
20
21
#include "debuglog.h"
21
#include "debuglog.h"
22
#include "utf8iter.h"
22
#include "utf8iter.h"
23
#include "smallut.h"
23
#include "smallut.h"
24
#include "refcntr.h"
24
#include MEMORY_INCLUDE
25
#include "textsplit.h"
25
#include "textsplit.h"
26
#include "xmacros.h"
26
#include "xmacros.h"
27
#include "rcldb.h"
27
#include "rcldb.h"
28
#include "stemdb.h"
28
#include "stemdb.h"
29
#include "expansiondbs.h"
29
#include "expansiondbs.h"
...
...
54
54
55
    // Stem dbs
55
    // Stem dbs
56
    vector<XapWritableComputableSynFamMember> stemdbs;
56
    vector<XapWritableComputableSynFamMember> stemdbs;
57
    // Note: tried to make this to work with stack-allocated objects, couldn't.
57
    // Note: tried to make this to work with stack-allocated objects, couldn't.
58
    // Looks like a bug in copy constructors somewhere, can't guess where
58
    // Looks like a bug in copy constructors somewhere, can't guess where
59
    vector<RefCntr<SynTermTransStem> > stemmers;
59
    vector<STD_SHARED_PTR<SynTermTransStem> > stemmers;
60
    for (unsigned int i = 0; i < langs.size(); i++) {
60
    for (unsigned int i = 0; i < langs.size(); i++) {
61
    stemmers.push_back(RefCntr<SynTermTransStem>
61
    stemmers.push_back(STD_SHARED_PTR<SynTermTransStem>
62
               (new SynTermTransStem(langs[i])));
62
               (new SynTermTransStem(langs[i])));
63
    stemdbs.push_back(
63
    stemdbs.push_back(
64
        XapWritableComputableSynFamMember(wdb, synFamStem, langs[i], 
64
        XapWritableComputableSynFamMember(wdb, synFamStem, langs[i], 
65
                          stemmers.back().getptr()));
65
                          stemmers.back().get()));
66
    stemdbs.back().recreate();
66
    stemdbs.back().recreate();
67
    }
67
    }
68
68
69
    // Unaccented stem dbs
69
    // Unaccented stem dbs
70
    vector<XapWritableComputableSynFamMember> unacstemdbs;
70
    vector<XapWritableComputableSynFamMember> unacstemdbs;
71
    // We can reuse the same stemmer pointers, the objects are stateless.
71
    // We can reuse the same stemmer pointers, the objects are stateless.
72
    if (!o_index_stripchars) {
72
    if (!o_index_stripchars) {
73
    for (unsigned int i = 0; i < langs.size(); i++) {
73
    for (unsigned int i = 0; i < langs.size(); i++) {
74
        unacstemdbs.push_back(
74
        unacstemdbs.push_back(
75
        XapWritableComputableSynFamMember(wdb, synFamStemUnac, langs[i], 
75
        XapWritableComputableSynFamMember(wdb, synFamStemUnac, langs[i], 
76
                          stemmers.back().getptr()));
76
                          stemmers.back().get()));
77
        unacstemdbs.back().recreate();
77
        unacstemdbs.back().recreate();
78
    }
78
    }
79
    }
79
    }
80
    SynTermTransUnac transunac(UNACOP_UNACFOLD);
80
    SynTermTransUnac transunac(UNACOP_UNACFOLD);
81
    XapWritableComputableSynFamMember 
81
    XapWritableComputableSynFamMember