summaryrefslogtreecommitdiff
path: root/qpid/cpp/lib/common/sys
diff options
context:
space:
mode:
authorGordon Sim <gsim@apache.org>2006-12-04 17:47:33 +0000
committerGordon Sim <gsim@apache.org>2006-12-04 17:47:33 +0000
commitadc5941cad54d7241c4ab4577c6ab2778ae6a68c (patch)
tree8e1c8703ca9666541fad3f5837c3c756454d2121 /qpid/cpp/lib/common/sys
parent2d7b42bfdd5e43d3c37e3d20ec5a7872cd50bcab (diff)
downloadqpid-python-adc5941cad54d7241c4ab4577c6ab2778ae6a68c.tar.gz
Patch from Andrew Stitcher:
This patch improves the performance of my test by about 20% It removes a lot of unnecessary string creation, as ...::check(...) is called for every CHECK_APR_SUCCESS(), and they are very frequent. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@482262 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/lib/common/sys')
-rw-r--r--qpid/cpp/lib/common/sys/apr/APRBase.cpp2
-rw-r--r--qpid/cpp/lib/common/sys/apr/APRBase.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/qpid/cpp/lib/common/sys/apr/APRBase.cpp b/qpid/cpp/lib/common/sys/apr/APRBase.cpp
index 19a1b93103..30c84e8736 100644
--- a/qpid/cpp/lib/common/sys/apr/APRBase.cpp
+++ b/qpid/cpp/lib/common/sys/apr/APRBase.cpp
@@ -82,7 +82,7 @@ void APRBase::decrement(){
getInstance()->_decrement();
}
-void qpid::sys::check(apr_status_t status, const std::string& file, const int line){
+void qpid::sys::check(apr_status_t status, const char* file, const int line){
if (status != APR_SUCCESS){
const int size = 50;
char tmp[size];
diff --git a/qpid/cpp/lib/common/sys/apr/APRBase.h b/qpid/cpp/lib/common/sys/apr/APRBase.h
index d1b3e21b91..9beba9fbad 100644
--- a/qpid/cpp/lib/common/sys/apr/APRBase.h
+++ b/qpid/cpp/lib/common/sys/apr/APRBase.h
@@ -52,7 +52,7 @@ namespace sys {
};
//this is also a convenient place for a helper function for error checking:
- void check(apr_status_t status, const std::string& file, const int line);
+ void check(apr_status_t status, const char* file, const int line);
std::string get_desc(apr_status_t status);
#define CHECK_APR_SUCCESS(A) qpid::sys::check(A, __FILE__, __LINE__);