From f5820a7780517f768e8ddfde50941342fa23b9c7 Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Thu, 3 Aug 2017 18:34:53 +0200 Subject: [PATCH] Simplification --- main.cpp | 5 ++--- main.h | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/main.cpp b/main.cpp index df2d7e3..a64d289 100644 --- a/main.cpp +++ b/main.cpp @@ -37,7 +37,7 @@ void VoIP::__construct(Php::Parameters ¶ms) self["internalStorage"] = empty; self["internalStorage"]["creator"] = params[0]; - self["internalStorage"]["otherID"] = params[1]; + otherID = (int) params[1]; self["internalStorage"]["callID"] = params[2]; self["madeline"] = params[3]; callState = (int) params[4]; @@ -198,8 +198,7 @@ Php::Value VoIP::isCreator() } Php::Value VoIP::getOtherID() { - Php::Value self(this); - return self["internalStorage"]["otherID"]; + return otherID; } Php::Value VoIP::setMadeline(Php::Parameters ¶ms) { diff --git a/main.h b/main.h index 67d9ac6..0756baa 100644 --- a/main.h +++ b/main.h @@ -112,7 +112,7 @@ public: bool configuringInput; FILE *outputFile; tgvoip_mutex_t outputMutex; - + int otherID; bool configuringOutput; private: