From caeaa5778c8626f85e9703b6a4c7395878d5a687 Mon Sep 17 00:00:00 2001 From: Stephen Sinclair Date: Tue, 1 Oct 2013 02:15:35 +0200 Subject: [PATCH] handleError member function must be declared const. Otherwise it causes a compilation failure when called from const functions. --- include/Stk.h | 2 +- src/Stk.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/Stk.h b/include/Stk.h index 8e3f709..5c9c37b 100644 --- a/include/Stk.h +++ b/include/Stk.h @@ -236,7 +236,7 @@ protected: void removeSampleRateAlert( Stk *ptr ); //! Internal function for error reporting that assumes message in \c oStream_ variable. - void handleError( StkError::Type type ); + void handleError( StkError::Type type ) const; }; diff --git a/src/Stk.cpp b/src/Stk.cpp index ab90da9..97a4ecd 100644 --- a/src/Stk.cpp +++ b/src/Stk.cpp @@ -192,7 +192,7 @@ void Stk :: sleep(unsigned long milliseconds) #endif } -void Stk :: handleError( StkError::Type type ) +void Stk :: handleError( StkError::Type type ) const { handleError( oStream_.str(), type ); oStream_.str( std::string() ); // reset the ostringstream buffer