[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [Soprano] 80e93c1: Hint symbol look-up by employing "using" instead o
From:       Daniel Molkentin <molkentin () kde ! org>
Date:       2010-10-26 12:01:01
Message-ID: 20101026120101.BD2D0A630C () git ! kde ! org
[Download RAW message or body]

commit 80e93c100aabef38af2ceab295da46b38a7abf04
branch 2.2
Author: Daniel Molkentin <molkentin@kde.org>
Date:   Thu Sep 25 14:10:18 2008 +0000

    Hint symbol look-up by employing "using" instead of a (possibly slightly slower) \
wrapper function.  
    svn path=/trunk/kdesupport/soprano/; revision=864794

diff --git a/index/cluceneindex.cpp b/index/cluceneindex.cpp
index 8dd9537..4c16005 100644
--- a/index/cluceneindex.cpp
+++ b/index/cluceneindex.cpp
@@ -41,14 +41,9 @@
 // indexwriter needs to be closed for deletion
 // indexreader needs to be closed after usage of writer
 
-uint Soprano::qHash( const Soprano::Node& node )
+uint qHash(  const Soprano::Node& node )
 {
-    return qHash( node.toString() );
-}
-
-uint qHash( const Soprano::Node& node )
-{
-    return qHash( node.toString() );
+    return qHash(  node.toString() );
 }
 
 class Soprano::Index::CLuceneIndex::Private
diff --git a/index/cluceneindex.h b/index/cluceneindex.h
index 21692cb..896ac10 100644
--- a/index/cluceneindex.h
+++ b/index/cluceneindex.h
@@ -45,7 +45,12 @@ namespace lucene {
     }
 }
 
+uint qHash( const Soprano::Node& node );
+
 namespace Soprano {
+
+    using ::qHash;
+
     namespace Index {
 
         /**
@@ -259,8 +264,6 @@ namespace Soprano {
             Private* const d;
         };
     }
-
-    uint qHash( const Soprano::Node& node );
 }
 
 #endif
diff --git a/soprano/inference/inferencemodel.cpp \
b/soprano/inference/inferencemodel.cpp index 5a80a44..1281882 100644
--- a/soprano/inference/inferencemodel.cpp
+++ b/soprano/inference/inferencemodel.cpp
@@ -37,6 +37,10 @@
 
 // FIXME: add error handling!
 
+uint qHash(  const Soprano::Node& node )
+{
+    return qHash(  node.toString() );
+}
 
 static Soprano::Node compressStatement( const Soprano::Statement& statement )
 {
@@ -65,7 +69,7 @@ static QUrl createRandomUri()
 // -----------------------------------------------------------------------------------------------------------------------
  #include <QSet>
 #include "statementiterator.h"
-uint Soprano::qHash( const Soprano::Node& node )
+uint qHash( const Soprano::Node& node )
 {
     return qHash( node.toString() );
 }
diff --git a/soprano/inference/inferencemodel.h b/soprano/inference/inferencemodel.h
index 0e095ee..2d6b1d3 100644
--- a/soprano/inference/inferencemodel.h
+++ b/soprano/inference/inferencemodel.h
@@ -27,9 +27,12 @@
 
 class QUrl;
 
+uint qHash( const Soprano::Node& node );
+
 namespace Soprano {
 
     class Statement;
+    using ::qHash;
 
     namespace Inference {
 
@@ -196,8 +199,6 @@ namespace Soprano {
             Private* const d;
         };
     }
-
-    uint qHash( const Soprano::Node& node );
 }
 
 #endif


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic