mirror of https://github.com/kiwix/libkiwix.git
Correct method declaration in `SuggestionItem`
This commit is contained in:
parent
b70c92cade
commit
18b6433322
|
@ -45,20 +45,20 @@ class SuggestionItem
|
||||||
// Temporarily making the constructor public until the code move is complete
|
// Temporarily making the constructor public until the code move is complete
|
||||||
public:
|
public:
|
||||||
// Create a sugggestion item.
|
// Create a sugggestion item.
|
||||||
explicit SuggestionItem(std::string title, std::string normalizedTitle,
|
explicit SuggestionItem(const std::string& title, const std::string& normalizedTitle,
|
||||||
std::string path, std::string snippet = "") :
|
const std::string& path, const std::string& snippet = "") :
|
||||||
title(title),
|
title(title),
|
||||||
normalizedTitle(normalizedTitle),
|
normalizedTitle(normalizedTitle),
|
||||||
path(path),
|
path(path),
|
||||||
snippet(snippet) {}
|
snippet(snippet) {}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
const std::string getTitle() {return title;}
|
const std::string& getTitle() const { return title;}
|
||||||
const std::string getNormalizedTitle() {return normalizedTitle;}
|
const std::string& getNormalizedTitle() const { return normalizedTitle;}
|
||||||
const std::string getPath() {return path;}
|
const std::string& getPath() const { return path;}
|
||||||
const std::string getSnippet() {return snippet;}
|
const std::string& getSnippet() const { return snippet;}
|
||||||
|
|
||||||
const bool hasSnippet() {return !snippet.empty();}
|
bool hasSnippet() const { return !snippet.empty();}
|
||||||
|
|
||||||
// Data
|
// Data
|
||||||
private:
|
private:
|
||||||
|
|
Loading…
Reference in New Issue