summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/gui/mailmessage.h2
-rw-r--r--src/gui/windows/mailwindow.cpp10
-rw-r--r--src/gui/windows/mailwindow.h8
3 files changed, 10 insertions, 10 deletions
diff --git a/src/gui/mailmessage.h b/src/gui/mailmessage.h
index 0f6d4f6b5..70ad038fa 100644
--- a/src/gui/mailmessage.h
+++ b/src/gui/mailmessage.h
@@ -60,7 +60,7 @@ struct MailMessage final
std::string strTime;
std::string text;
uint16_t card[maxMailCards];
- int id;
+ int64_t id;
int time;
int expireTime;
int money;
diff --git a/src/gui/windows/mailwindow.cpp b/src/gui/windows/mailwindow.cpp
index 647eb17f5..c12b719fc 100644
--- a/src/gui/windows/mailwindow.cpp
+++ b/src/gui/windows/mailwindow.cpp
@@ -207,9 +207,9 @@ void MailWindow::addMail(MailMessage *const message)
mMessagesMap[message->id] = message;
}
-void MailWindow::removeMail(const int id)
+void MailWindow::removeMail(const int64_t id)
{
- std::map<int, MailMessage*>::iterator it1 = mMessagesMap.find(id);
+ std::map<int64_t, MailMessage*>::iterator it1 = mMessagesMap.find(id);
if (it1 != mMessagesMap.end())
mMessagesMap.erase(it1);
@@ -238,7 +238,7 @@ void MailWindow::showMessage(MailMessage *const mail)
{
if (mail == nullptr)
return;
- const std::map<int, MailMessage*>::const_iterator
+ const std::map<int64_t, MailMessage*>::const_iterator
it = mMessagesMap.find(mail->id);
if (it != mMessagesMap.end())
{
@@ -250,7 +250,7 @@ void MailWindow::showMessage(MailMessage *const mail)
CREATEWIDGETV(mailViewWindow, MailViewWindow, mail);
}
-void MailWindow::viewNext(const int id)
+void MailWindow::viewNext(const int64_t id)
{
FOR_EACH (STD_VECTOR<MailMessage*>::iterator, it, mMessages)
{
@@ -274,7 +274,7 @@ void MailWindow::viewNext(const int id)
}
}
-void MailWindow::viewPrev(const int id)
+void MailWindow::viewPrev(const int64_t id)
{
FOR_EACH (STD_VECTOR<MailMessage*>::iterator, it, mMessages)
{
diff --git a/src/gui/windows/mailwindow.h b/src/gui/windows/mailwindow.h
index 7c808379d..8a6bc6695 100644
--- a/src/gui/windows/mailwindow.h
+++ b/src/gui/windows/mailwindow.h
@@ -57,11 +57,11 @@ class MailWindow final : public Window,
void showMessage(MailMessage *const mail);
- void removeMail(const int id);
+ void removeMail(const int64_t id);
- void viewNext(const int id);
+ void viewNext(const int64_t id);
- void viewPrev(const int id);
+ void viewPrev(const int64_t id);
void mouseClicked(MouseEvent &event) override final;
@@ -79,7 +79,7 @@ class MailWindow final : public Window,
A_WARN_UNUSED A_NONNULL(2);
STD_VECTOR<MailMessage*> mMessages;
- std::map<int, MailMessage*> mMessagesMap;
+ std::map<int64_t, MailMessage*> mMessagesMap;
ExtendedNamesModel *mMailModel;
ExtendedListBox *mListBox;
ScrollArea *mListScrollArea;