From 37cf2e98a2dc2c2fd831acede6405593b1e953a3 Mon Sep 17 00:00:00 2001 From: joss17 Date: Thu, 14 Jan 2010 00:35:16 +0000 Subject: [PATCH] remove boost call git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2030 b45a01b8-16f6-495d-af2f-9b41ad6348cc --- libretroshare/src/pqi/authgpg.cc | 6 ++++-- libretroshare/src/rsserver/p3peers.cc | 11 ++++++++--- .../src/gui/connect/ConnectFriendWizard.cpp | 6 ++---- 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/libretroshare/src/pqi/authgpg.cc b/libretroshare/src/pqi/authgpg.cc index a0c264844..f8c70ddd5 100644 --- a/libretroshare/src/pqi/authgpg.cc +++ b/libretroshare/src/pqi/authgpg.cc @@ -29,7 +29,6 @@ #include #include #include -#include #include "serialiser/rsconfigitems.h" @@ -1383,7 +1382,10 @@ int AuthGPG::privateTrustCertificate(std::string id, int trustlvl) gpgcert trustCert = mKeyList.find(id)->second; gpgme_key_t trustKey = trustCert.key; - class TrustParams sparams((boost::lexical_cast(trustlvl))); + std::string trustString; + std::ostringstream trustStrOut; + trustStrOut << trustlvl; + class TrustParams sparams(trustStrOut.str()); class EditParams params(TRUST_START, &sparams); gpgme_data_t out; gpg_error_t ERR; diff --git a/libretroshare/src/rsserver/p3peers.cc b/libretroshare/src/rsserver/p3peers.cc index 26279e74c..0846b40fa 100644 --- a/libretroshare/src/rsserver/p3peers.cc +++ b/libretroshare/src/rsserver/p3peers.cc @@ -29,7 +29,6 @@ #include "pqi/authssl.h" #include "pqi/authgpg.h" #include -#include #include @@ -963,7 +962,10 @@ bool p3Peers::loadDetailsFromStringCert(std::string certstr, RsPeerDetails &pd) if (parsePosition != std::string::npos) { std::string local_port = subCert.substr(0, parsePosition); std::cerr << "Local port : " << local_port << std::endl; - pd.localPort = (boost::lexical_cast(local_port)); + std::istringstream instream(local_port); + uint16_t local_port_int; + instream >> local_port_int; + pd.localPort = (local_port_int); } } } @@ -986,7 +988,10 @@ bool p3Peers::loadDetailsFromStringCert(std::string certstr, RsPeerDetails &pd) if (parsePosition != std::string::npos) { std::string ext_port = subCert.substr(0, parsePosition); std::cerr << "Ext port : " << ext_port << std::endl; - pd.extPort = (boost::lexical_cast(ext_port)); + std::istringstream instream(ext_port); + uint16_t ext_port_int; + instream >> ext_port_int; + pd.extPort = (ext_port_int); } } } diff --git a/retroshare-gui/src/gui/connect/ConnectFriendWizard.cpp b/retroshare-gui/src/gui/connect/ConnectFriendWizard.cpp index 2a6e92063..9ff87c8fa 100755 --- a/retroshare-gui/src/gui/connect/ConnectFriendWizard.cpp +++ b/retroshare-gui/src/gui/connect/ConnectFriendWizard.cpp @@ -48,8 +48,6 @@ #include #include -#include - #include #include #include @@ -349,9 +347,9 @@ int TextPage::nextId() const { wizard()->setField(CERT_STRING_FIELD_CONNECT_FRIEND_WIZARD, QString::fromStdString(certstr)); wizard()->setField("ext_friend_ip", QString::fromStdString(pd.extAddr)); - wizard()->setField("ext_friend_port", QString::fromStdString(boost::lexical_cast(pd.extPort))); + wizard()->setField("ext_friend_port", QString::number(pd.extPort)); wizard()->setField("local_friend_ip", QString::fromStdString(pd.localAddr)); - wizard()->setField("local_friend_port", QString::fromStdString(boost::lexical_cast(pd.localPort))); + wizard()->setField("local_friend_port", QString::number(pd.localPort)); return ConnectFriendWizard::Page_Conclusion ; }