From 0a8af4bb049082c2601cea509c7a28ec4ff5ef87 Mon Sep 17 00:00:00 2001 From: Gordon Sim Date: Mon, 4 Dec 2006 17:47:33 +0000 Subject: 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 --- cpp/lib/common/sys/apr/APRBase.cpp | 2 +- cpp/lib/common/sys/apr/APRBase.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'cpp') 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__); -- cgit v1.2.1