+using std::max;
+
+/*
+ * Class Change has a changetime field that specifies the exact time at which
+ * a specific change was made. The change time is used as a guidance for the
+ * user while editing his document. Presently, it is not considered for LaTeX
+ * export.
+ * When merging two adjacent changes, the changetime is not considered,
+ * only the equality of the change type and author is checked (in method
+ * isSimilarTo(...)). If two changes are in fact merged (in method merge()),
+ * the later change time is preserved.
+ */
+
+bool Change::isSimilarTo(Change const & change)
+{
+ if (type != change.type) {
+ return false;
+ }
+
+ if (type == Change::UNCHANGED) {
+ return true;
+ }
+
+ return author == change.author;
+}