File: 2002-fix-type-limits-error.patch

package info (click to toggle)
sol2 3.5.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 23,096 kB
  • sloc: cpp: 43,816; ansic: 1,018; python: 356; sh: 288; makefile: 202
file content (20 lines) | stat: -rw-r--r-- 843 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Description: Fix gcc warning -Wtype-limits
 Upstream developer fixed this in the development branch
 https://github.com/ThePhD/sol2/commit/c1f95a773c6f8f4fde8ca3efe872e7286afe4444
Forwarded: not-needed
Author: syzygial <syzygial.123@gmail.com>
Last-Update: 2025-05-31
---
diff --git a/tests/coroutines/source/array_proxy_lifetime.cpp b/tests/coroutines/source/array_proxy_lifetime.cpp
index 2e039f5..320481e 100644
--- a/tests/coroutines/source/array_proxy_lifetime.cpp
+++ b/tests/coroutines/source/array_proxy_lifetime.cpp
@@ -59,7 +59,7 @@ inline namespace sol2_regression_test_coroutines_array_proxy_lifetime {
 
 			value_type operator*() const {
 				size_t size = a.mpParent.children.size();
-				if (index >= 0 && index < size) {
+				if (index < size) {
 					return a.mpParent.children[index];
 				}
 				return std::weak_ptr<A>();