From: JINMEI Tatuya Date: Fri, 11 Jan 2013 18:51:29 +0000 (-0800) Subject: [master] introduce a temporary variable to work around some build failure X-Git-Tag: bind10-1.0.0-rc-release~95^2~9 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=30e71e8bfdb6049265dca14a8ce62b989fe67118;p=thirdparty%2Fkea.git [master] introduce a temporary variable to work around some build failure some compilers seem to be confused if we directly call a method on the result of dynamic_cast. I suspect it's a bug of the compiler in template handling, but the workaround doesn't look so messy and I think it's acceptable. committing at my discretion. --- diff --git a/src/lib/datasrc/tests/database_unittest.cc b/src/lib/datasrc/tests/database_unittest.cc index 06b3874008..3a97cb522a 100644 --- a/src/lib/datasrc/tests/database_unittest.cc +++ b/src/lib/datasrc/tests/database_unittest.cc @@ -1322,8 +1322,11 @@ public: // Mock-only; control whether to allow subsequent transaction. void allowMoreTransaction(bool is_allowed) { if (is_mock_) { - dynamic_cast(*current_accessor_). - allowMoreTransaction(is_allowed); + // Use a separate variable for MockAccessor&; some compilers + // would be confused otherwise. + MockAccessor& mock_accessor = + dynamic_cast(*current_accessor_); + mock_accessor.allowMoreTransaction(is_allowed); } }