7#include "stringlistpair.h"
14unsigned int StringListPair::lengthFirst()
const
19unsigned int StringListPair::lengthSecond()
const
21 return m_lengthSecond;
24MarkerList StringListPair::markerListFirst()
const
26 return m_markersFirst;
29MarkerList StringListPair::markerListSecond()
const
31 return m_markersSecond;
34void StringListPair::prependFirst(
Marker *marker)
39void StringListPair::prependSecond(
Marker *marker)
41 m_markersSecond.
prepend(marker);
48 , m_lengthFirst(first.length() + 1)
49 , m_lengthSecond(second.length() + 1)
50 , m_hashesFirst(m_lengthFirst)
51 , m_hashesSecond(m_lengthSecond)
54 for (
unsigned int i = 1; i < m_lengthFirst; ++i) {
55 m_hashesFirst[i] =
qHash(first[i - 1]);
58 for (
unsigned int i = 1; i < m_lengthSecond; ++i) {
59 m_hashesSecond[i] =
qHash(second[i - 1]);
63StringListPair::~StringListPair() =
default;
65bool StringListPair::equal(
unsigned int firstIndex,
unsigned int secondIndex)
const
67 if (m_hashesFirst[firstIndex] != m_hashesSecond[secondIndex]) {
70 if (firstIndex == 0 || secondIndex == 0) {
71 return firstIndex == 0 && secondIndex == 0;
73 return m_first[firstIndex - 1] == m_second[secondIndex - 1];
76bool StringListPair::needFineGrainedOutput(
unsigned int)
const
KCALENDARCORE_EXPORT size_t qHash(const KCalendarCore::Period &key, size_t seed=0)
void prepend(parameter_type value)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 22 2024 12:05:06 by
doxygen 1.12.0 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.