From 1783d7df5824b7f1c2fffcf4782d4b87fff59436 Mon Sep 17 00:00:00 2001 From: jxd134 Date: Fri, 26 Feb 2016 20:33:52 +0800 Subject: [PATCH] the return value of difference_type function in iterator.h is difference_type* --- TinySTL/Detail/Alloc.cpp | 2 ++ TinySTL/Iterator.h | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/TinySTL/Detail/Alloc.cpp b/TinySTL/Detail/Alloc.cpp index 260f48f..ead46f1 100644 --- a/TinySTL/Detail/Alloc.cpp +++ b/TinySTL/Detail/Alloc.cpp @@ -1,9 +1,11 @@ #include "../Alloc.h" namespace TinySTL{ + char *alloc::start_free = 0; char *alloc::end_free = 0; size_t alloc::heap_size = 0; + alloc::obj *alloc::free_list[alloc::ENFreeLists::NFREELISTS] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; diff --git a/TinySTL/Iterator.h b/TinySTL/Iterator.h index e2457dc..fb56b57 100644 --- a/TinySTL/Iterator.h +++ b/TinySTL/Iterator.h @@ -101,7 +101,7 @@ namespace TinySTL{ return static_cast::value_type*>(0); } template - inline typename iterator_traits::difference_type + inline typename iterator_traits::difference_type* difference_type(const Iterator& It){ return static_cast::difference_type*>(0); }