MCPcopy Create free account
hub / github.com/couchbase/fleece / diff_main

Method diff_main

Fleece/Support/diff_match_patch.hh:280–291  ·  view source on GitHub ↗

* Find the differences between two texts. * @param text1 Old string to be diffed. * @param text2 New string to be diffed. * @param checklines Speedup flag. If false, then don't run a * line-level diff first to identify the changed areas. * If true, then run a faster slightly less optimal diff. * Most of the time checklines is wanted, so default to true. * @return

Source from the content-addressed store, hash-verified

278 * @return Linked List of Diff objects.
279 */
280 Diffs diff_main(const string_t &text1, const string_t &text2, bool checklines = true) const {
281 // Set a deadline by which time the diff must be complete.
282 clock_t deadline;
283 if (Diff_Timeout <= 0) {
284 deadline = std::numeric_limits<clock_t>::max();
285 } else {
286 deadline = clock() + (clock_t)(Diff_Timeout * CLOCKS_PER_SEC);
287 }
288 Diffs diffs;
289 diff_main(text1, text2, checklines, deadline, diffs);
290 return diffs;
291 }
292
293 /**
294 * Find the differences between two texts. Simplifies the problem by

Callers

nothing calls this directly

Calls 4

DiffClass · 0.85
lengthMethod · 0.80
clearMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected