aboutsummaryrefslogtreecommitdiff
path: root/src/qt
diff options
context:
space:
mode:
authorPhilip Kaufmann <phil.kaufmann@t-online.de>2012-05-20 00:46:23 +0200
committerPhilip Kaufmann <phil.kaufmann@t-online.de>2012-05-20 00:48:34 +0200
commit00fb08158d8a3a0d00f9d0360f376782b42f7d02 (patch)
tree7acd0115044548380f228cf97e0f732d98e04688 /src/qt
parentcde87ee75cd95b076259e146705bf34b66cd83aa (diff)
downloadbitcoin-00fb08158d8a3a0d00f9d0360f376782b42f7d02.tar.xz
remove strncasecmp() + strnicmp() calls and replace that code via boost::algorithm::istarts_with() / do not call ipcInit() on Mac and Windows as this is unneeded currently
Diffstat (limited to 'src/qt')
-rw-r--r--src/qt/bitcoin.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp
index 9452f7e1e3..479638714f 100644
--- a/src/qt/bitcoin.cpp
+++ b/src/qt/bitcoin.cpp
@@ -21,6 +21,7 @@
#include <QLibraryInfo>
#include <boost/interprocess/ipc/message_queue.hpp>
+#include <boost/algorithm/string/predicate.hpp>
#if defined(BITCOIN_NEED_QT_PLUGINS) && !defined(_BITCOIN_QT_PLUGINS_INCLUDED)
#define _BITCOIN_QT_PLUGINS_INCLUDED
@@ -177,9 +178,6 @@ void HelpMessageBox::exec()
#endif
}
-#ifdef WIN32
-#define strncasecmp strnicmp
-#endif
#ifndef BITCOIN_QT_TEST
int main(int argc, char *argv[])
{
@@ -189,7 +187,7 @@ int main(int argc, char *argv[])
// Do this early as we don't want to bother initializing if we are just calling IPC
for (int i = 1; i < argc; i++)
{
- if (strlen(argv[i]) > 7 && strncasecmp(argv[i], "bitcoin:", 8) == 0)
+ if (boost::algorithm::istarts_with(argv[i], "bitcoin:"))
{
const char *strURI = argv[i];
try {
@@ -323,17 +321,16 @@ int main(int argc, char *argv[])
{
window.show();
}
+#if !defined(MAC_OSX) && !defined(WIN32)
+// TODO: implement qtipcserver.cpp for Mac and Windows
// Place this here as guiref has to be defined if we dont want to lose URIs
ipcInit();
-#if !defined(MAC_OSX) && !defined(WIN32)
-// TODO: implement qtipcserver.cpp for Mac and Windows
-
// Check for URI in argv
for (int i = 1; i < argc; i++)
{
- if (strlen(argv[i]) > 7 && strncasecmp(argv[i], "bitcoin:", 8) == 0)
+ if (boost::algorithm::istarts_with(argv[i], "bitcoin:"))
{
const char *strURI = argv[i];
try {