summaryrefslogtreecommitdiff
path: root/src/resources/db/textdb.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/resources/db/textdb.cpp')
-rw-r--r--src/resources/db/textdb.cpp17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/resources/db/textdb.cpp b/src/resources/db/textdb.cpp
index 28198162d..8a8771535 100644
--- a/src/resources/db/textdb.cpp
+++ b/src/resources/db/textdb.cpp
@@ -30,7 +30,7 @@
namespace
{
- std::vector<std::string> mTexts;
+ StringVect mTexts;
} // namespace
void TextDb::load()
@@ -85,3 +85,18 @@ void TextDb::unload()
{
mTexts.clear();
}
+
+const StringVect &TextDb::getTexts()
+{
+ return mTexts;
+}
+
+std::string TextDb::getByIndex(const int index)
+{
+ if (index < 0 ||
+ static_cast<size_t>(index) >= mTexts.size())
+ {
+ return std::string();
+ }
+ return mTexts[index];
+}