~bibledit/bibledit/ubuntu-cloud

« back to all changes in this revision

Viewing changes to filter/merge.cpp

  • Committer: Teus Benschop
  • Date: 2022-08-30 18:42:32 UTC
  • Revision ID: teusjannette@gmail.com-20220830184232-a5bf5fkj14cqdx01
new upstream version

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 
19
19
 
20
20
#include <filter/merge.h>
 
21
#pragma GCC diagnostic push
 
22
#pragma clang diagnostic ignored "-Wsign-conversion"
 
23
#pragma GCC diagnostic ignored "-Weffc++"
 
24
#pragma GCC diagnostic ignored "-Wold-style-cast"
21
25
#include <dtl/dtl.hpp>
22
 
using dtl::Diff3;
 
26
#pragma GCC diagnostic pop
23
27
#include <filter/string.h>
 
28
#pragma GCC diagnostic push
 
29
#pragma GCC diagnostic ignored "-Weffc++"
24
30
#include <pugixml/pugixml.hpp>
 
31
#pragma GCC diagnostic pop
25
32
#include <email/send.h>
26
33
#include <filter/usfm.h>
27
34
 
28
35
 
 
36
using dtl::Diff3;
29
37
using namespace pugi;
30
38
 
31
39
 
104
112
}
105
113
 
106
114
 
107
 
void filter_merge_detect_conflict (string base, string change, string prioritized_change, string result,
 
115
void filter_merge_detect_conflict (string base,
 
116
                                   string change,
 
117
                                   string prioritized_change,
 
118
                                   string result,
108
119
                                   vector <Merge_Conflict> & conflicts)
109
120
{
110
121
  // Clean input.
249
260
                                vector <Merge_Conflict> & conflicts)
250
261
{
251
262
  // Get the verse numbers in the changed text.
252
 
  vector <int> verses = usfm_get_verse_numbers (change);
 
263
  vector <int> verses = filter::usfm::get_verse_numbers (change);
253
264
  
254
265
  vector <string> results;
255
266
  
259
270
  for (auto verse : verses) {
260
271
    
261
272
    // Gets the texts to merge for this verse.
262
 
    string base_text = usfm_get_verse_text (base, verse);
263
 
    string change_text = usfm_get_verse_text (change, verse);
264
 
    string prioritized_change_text = usfm_get_verse_text (prioritized_change, verse);
 
273
    string base_text = filter::usfm::get_verse_text (base, verse);
 
274
    string change_text = filter::usfm::get_verse_text (change, verse);
 
275
    string prioritized_change_text = filter::usfm::get_verse_text (prioritized_change, verse);
265
276
    
266
277
    // Check for combined verses.
267
278
    if (change_text == previous_change) continue;