From c441c6f2f5ec31a624c56fd7b64e0b438026e93f Mon Sep 17 00:00:00 2001 From: Kim van der Riet Date: Tue, 19 Dec 2006 20:54:22 +0000 Subject: [For Andrew Stitcher] inlined qpid::sys::check() in APRBase.h; This is called a lot - for every call to an APR call, inlining this seems to give about 8% speed in my tests (even though originally check() only seemed to use 1-2% of the time). I think this must be a 2nd order instruction caching effect. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@488808 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/lib/common/sys/apr/APRBase.cpp | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'cpp/lib/common/sys/apr/APRBase.cpp') diff --git a/cpp/lib/common/sys/apr/APRBase.cpp b/cpp/lib/common/sys/apr/APRBase.cpp index 30c84e8736..861071499f 100644 --- a/cpp/lib/common/sys/apr/APRBase.cpp +++ b/cpp/lib/common/sys/apr/APRBase.cpp @@ -82,16 +82,6 @@ void APRBase::decrement(){ getInstance()->_decrement(); } -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]; - std::string msg(apr_strerror(status, tmp, size)); - throw QpidError(APR_ERROR + ((int) status), msg, - qpid::SrcLine(file, line)); - } -} - std::string qpid::sys::get_desc(apr_status_t status){ const int size = 50; char tmp[size]; -- cgit v1.2.1