summaryrefslogtreecommitdiff
path: root/protocols/Tox/src/tox_utils.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/Tox/src/tox_utils.cpp')
-rw-r--r--protocols/Tox/src/tox_utils.cpp13
1 files changed, 2 insertions, 11 deletions
diff --git a/protocols/Tox/src/tox_utils.cpp b/protocols/Tox/src/tox_utils.cpp
index f9e315c9d3..4fb527df27 100644
--- a/protocols/Tox/src/tox_utils.cpp
+++ b/protocols/Tox/src/tox_utils.cpp
@@ -2,20 +2,14 @@
TOX_USERSTATUS CToxProto::MirandaToToxStatus(int status)
{
- TOX_USERSTATUS userstatus;
+ TOX_USERSTATUS userstatus = TOX_USERSTATUS_NONE;
switch (status)
{
- case ID_STATUS_ONLINE:
- userstatus = TOX_USERSTATUS_NONE;
- break;
case ID_STATUS_AWAY:
userstatus = TOX_USERSTATUS_AWAY;
break;
case ID_STATUS_OCCUPIED:
userstatus = TOX_USERSTATUS_BUSY;
-break;
- default:
- userstatus = TOX_USERSTATUS_INVALID;
break;
}
return userstatus;
@@ -23,7 +17,7 @@ break;
int CToxProto::ToxToMirandaStatus(TOX_USERSTATUS userstatus)
{
- int status;
+ int status = ID_STATUS_OFFLINE;
switch (userstatus)
{
case TOX_USERSTATUS_NONE:
@@ -35,9 +29,6 @@ int CToxProto::ToxToMirandaStatus(TOX_USERSTATUS userstatus)
case TOX_USERSTATUS_BUSY:
status = ID_STATUS_OCCUPIED;
break;
- default:
- status = ID_STATUS_OFFLINE;
- break;
}
return status;
}