diff options
author | Gordon Sim <gsim@apache.org> | 2006-12-04 17:47:33 +0000 |
---|---|---|
committer | Gordon Sim <gsim@apache.org> | 2006-12-04 17:47:33 +0000 |
commit | 0a8af4bb049082c2601cea509c7a28ec4ff5ef87 (patch) | |
tree | 6f2f4750e71481459180a67f4e752781640baa0a | |
parent | b9d2b4bc80748d0a6a7209d0ce5dce97565c83ae (diff) | |
download | qpid-python-0a8af4bb049082c2601cea509c7a28ec4ff5ef87.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/qpid@482262 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | cpp/lib/common/sys/apr/APRBase.cpp | 2 | ||||
-rw-r--r-- | cpp/lib/common/sys/apr/APRBase.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/cpp/lib/common/sys/apr/APRBase.cpp b/cpp/lib/common/sys/apr/APRBase.cpp index 19a1b93103..30c84e8736 100644 --- a/cpp/lib/common/sys/apr/APRBase.cpp +++ b/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/cpp/lib/common/sys/apr/APRBase.h b/cpp/lib/common/sys/apr/APRBase.h index d1b3e21b91..9beba9fbad 100644 --- a/cpp/lib/common/sys/apr/APRBase.h +++ b/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__); |