susumu.yata
null+****@clear*****
Tue Aug 5 16:12:06 JST 2014
susumu.yata 2014-08-05 16:12:06 +0900 (Tue, 05 Aug 2014) New Revision: 40863ee5d8343f08b3246cd31627abad5bd2c963 https://github.com/groonga/grnxx/commit/40863ee5d8343f08b3246cd31627abad5bd2c963 Message: Rename ArrayHelper to ArrayErrorReporter. Modified files: include/grnxx/array.hpp lib/grnxx/array.cpp Modified: include/grnxx/array.hpp (+7 -7) =================================================================== --- include/grnxx/array.hpp 2014-08-05 15:35:49 +0900 (94e9d84) +++ include/grnxx/array.hpp 2014-08-05 16:12:06 +0900 (5dec410) @@ -7,7 +7,7 @@ namespace grnxx { -class ArrayHelper { +class ArrayErrorReporter { public: static void report_memory_error(Error *error); }; @@ -64,7 +64,7 @@ class Array { values_.reserve(new_size); return true; } catch (...) { - ArrayHelper::report_memory_error(error); + ArrayErrorReporter::report_memory_error(error); return false; } @@ -72,14 +72,14 @@ class Array { values_.resize(new_size); return true; } catch (...) { - ArrayHelper::report_memory_error(error); + ArrayErrorReporter::report_memory_error(error); return false; } bool resize(Error *error, Int new_size, const T &value) try { values_.resize(new_size, value); return true; } catch (...) { - ArrayHelper::report_memory_error(error); + ArrayErrorReporter::report_memory_error(error); return false; } @@ -87,7 +87,7 @@ class Array { values_.shrink_to_fit(); return true; } catch (...) { - ArrayHelper::report_memory_error(error); + ArrayErrorReporter::report_memory_error(error); return false; } @@ -103,14 +103,14 @@ class Array { values_.push_back(value); return true; } catch (...) { - ArrayHelper::report_memory_error(error); + ArrayErrorReporter::report_memory_error(error); return false; } bool push_back(Error *error, T &&value) try { values_.push_back(std::move(value)); return true; } catch (...) { - ArrayHelper::report_memory_error(error); + ArrayErrorReporter::report_memory_error(error); return false; } void pop_back() { Modified: lib/grnxx/array.cpp (+1 -1) =================================================================== --- lib/grnxx/array.cpp 2014-08-05 15:35:49 +0900 (5ed1301) +++ lib/grnxx/array.cpp 2014-08-05 16:12:06 +0900 (cc2fd79) @@ -4,7 +4,7 @@ namespace grnxx { -void ArrayHelper::report_memory_error(Error *error) { +void ArrayErrorReporter::report_memory_error(Error *error) { GRNXX_ERROR_SET(error, NO_MEMORY, "Memory allocation failed"); } -------------- next part -------------- HTML����������������������������... Télécharger