diff --git a/doctest/doctest.h b/doctest/doctest.h
index 7b0283c..e13b51b 100644
--- a/doctest/doctest.h
+++ b/doctest/doctest.h
@@ -928,7 +928,7 @@
         filldata<T>::fill(stream, in);
     }
 
-    template <typename T, unsigned long N>
+    template <typename T, size_t N>
     void filloss(std::ostream* stream, const T (&in)[N]) {
         // T[N], T(&)[N], T(&&)[N] have same behaviour.
         // Hence remove reference.
@@ -1004,11 +1004,11 @@
         }
     };
 
-    template <typename T, unsigned long N>
+    template <typename T, size_t N>
     struct filldata<T[N]> {
         static void fill(std::ostream* stream, const T(&in)[N]) {
             *stream << "[";
-            for (unsigned long i = 0; i < N; i++) {
+            for (size_t i = 0; i < N; i++) {
                 if (i != 0) { *stream << ", "; }
                 *stream << toString(in[i]);
             }
@@ -1017,7 +1017,7 @@
     };
 
     // Specialized since we don't want the terminating null byte!
-    template <unsigned long N>
+    template <size_t N>
     struct filldata<const char[N]> {
         static void fill(std::ostream* stream, const char (&in)[N]) {
             *stream << String(in, in[N - 1] ? N : N - 1);
@@ -3891,15 +3891,6 @@
         return !*wild;
     }
 
-    //// C string hash function (djb2) - taken from http://www.cse.yorku.ca/~oz/hash.html
-    //unsigned hashStr(unsigned const char* str) {
-    //    unsigned long hash = 5381;
-    //    char          c;
-    //    while((c = *str++))
-    //        hash = ((hash << 5) + hash) + c; // hash * 33 + c
-    //    return hash;
-    //}
-
     // checks if the name matches any of the filters (and can be configured what to do when empty)
     bool matchesAny(const char* name, const std::vector<String>& filters, bool matchEmpty,
                     bool caseSensitive) {
diff --git a/doctest/parts/doctest.cpp b/doctest/parts/doctest.cpp
index b5f4d84..d50bfbc 100644
--- a/doctest/parts/doctest.cpp
+++ b/doctest/parts/doctest.cpp
@@ -987,15 +987,6 @@
         return !*wild;
     }
 
-    //// C string hash function (djb2) - taken from http://www.cse.yorku.ca/~oz/hash.html
-    //unsigned hashStr(unsigned const char* str) {
-    //    unsigned long hash = 5381;
-    //    char          c;
-    //    while((c = *str++))
-    //        hash = ((hash << 5) + hash) + c; // hash * 33 + c
-    //    return hash;
-    //}
-
     // checks if the name matches any of the filters (and can be configured what to do when empty)
     bool matchesAny(const char* name, const std::vector<String>& filters, bool matchEmpty,
                     bool caseSensitive) {
diff --git a/doctest/parts/doctest_fwd.h b/doctest/parts/doctest_fwd.h
index e980ac7..c1c6688 100644
--- a/doctest/parts/doctest_fwd.h
+++ b/doctest/parts/doctest_fwd.h
@@ -925,7 +925,7 @@
         filldata<T>::fill(stream, in);
     }
 
-    template <typename T, unsigned long N>
+    template <typename T, size_t N>
     void filloss(std::ostream* stream, const T (&in)[N]) {
         // T[N], T(&)[N], T(&&)[N] have same behaviour.
         // Hence remove reference.
@@ -1001,11 +1001,11 @@
         }
     };
 
-    template <typename T, unsigned long N>
+    template <typename T, size_t N>
     struct filldata<T[N]> {
         static void fill(std::ostream* stream, const T(&in)[N]) {
             *stream << "[";
-            for (unsigned long i = 0; i < N; i++) {
+            for (size_t i = 0; i < N; i++) {
                 if (i != 0) { *stream << ", "; }
                 *stream << toString(in[i]);
             }
@@ -1014,7 +1014,7 @@
     };
 
     // Specialized since we don't want the terminating null byte!
-    template <unsigned long N>
+    template <size_t N>
     struct filldata<const char[N]> {
         static void fill(std::ostream* stream, const char (&in)[N]) {
             *stream << String(in, in[N - 1] ? N : N - 1);
