Commit 245ca280665ebeed9cf77b667181e2b0843f8740

Authored by Jay Berkenbilt
1 parent addd6bef

Use value rather than reference captures where possible

Showing 1 changed file with 27 additions and 27 deletions
libqpdf/qpdf-c.cc
@@ -895,7 +895,7 @@ static RET trap_oh_errors( @@ -895,7 +895,7 @@ static RET trap_oh_errors(
895 // unless needed. This is important because sometimes the fallback 895 // unless needed. This is important because sometimes the fallback
896 // creates an object. 896 // creates an object.
897 RET ret; 897 RET ret;
898 - QPDF_ERROR_CODE status = trap_errors(qpdf, [&ret, &fn] (qpdf_data q) { 898 + QPDF_ERROR_CODE status = trap_errors(qpdf, [&ret, fn] (qpdf_data q) {
899 ret = fn(q); 899 ret = fn(q);
900 }); 900 });
901 if (status & QPDF_ERRORS) 901 if (status & QPDF_ERRORS)
@@ -985,7 +985,7 @@ static RET do_with_oh( @@ -985,7 +985,7 @@ static RET do_with_oh(
985 std::function<RET(QPDFObjectHandle&)> fn) 985 std::function<RET(QPDFObjectHandle&)> fn)
986 { 986 {
987 return trap_oh_errors<RET>( 987 return trap_oh_errors<RET>(
988 - qpdf, fallback, [&fn, &oh](qpdf_data q) { 988 + qpdf, fallback, [fn, oh](qpdf_data q) {
989 auto i = q->oh_cache.find(oh); 989 auto i = q->oh_cache.find(oh);
990 bool result = ((i != q->oh_cache.end()) && 990 bool result = ((i != q->oh_cache.end()) &&
991 (i->second).getPointer()); 991 (i->second).getPointer());
@@ -1008,7 +1008,7 @@ static void do_with_oh_void( @@ -1008,7 +1008,7 @@ static void do_with_oh_void(
1008 std::function<void(QPDFObjectHandle&)> fn) 1008 std::function<void(QPDFObjectHandle&)> fn)
1009 { 1009 {
1010 do_with_oh<bool>( 1010 do_with_oh<bool>(
1011 - qpdf, oh, return_T<bool>(false), [&fn](QPDFObjectHandle& o) { 1011 + qpdf, oh, return_T<bool>(false), [fn](QPDFObjectHandle& o) {
1012 fn(o); 1012 fn(o);
1013 return true; // unused 1013 return true; // unused
1014 }); 1014 });
@@ -1017,7 +1017,7 @@ static void do_with_oh_void( @@ -1017,7 +1017,7 @@ static void do_with_oh_void(
1017 void qpdf_replace_object(qpdf_data qpdf, int objid, int generation, qpdf_oh oh) 1017 void qpdf_replace_object(qpdf_data qpdf, int objid, int generation, qpdf_oh oh)
1018 { 1018 {
1019 do_with_oh_void( 1019 do_with_oh_void(
1020 - qpdf, oh, [&qpdf, &objid, &generation](QPDFObjectHandle& o) { 1020 + qpdf, oh, [qpdf, objid, generation](QPDFObjectHandle& o) {
1021 QTC::TC("qpdf", "qpdf-c called qpdf_replace_object"); 1021 QTC::TC("qpdf", "qpdf-c called qpdf_replace_object");
1022 qpdf->qpdf->replaceObject(objid, generation, o); 1022 qpdf->qpdf->replaceObject(objid, generation, o);
1023 }); 1023 });
@@ -1162,8 +1162,8 @@ qpdf_oh qpdf_oh_wrap_in_array(qpdf_data qpdf, qpdf_oh oh) @@ -1162,8 +1162,8 @@ qpdf_oh qpdf_oh_wrap_in_array(qpdf_data qpdf, qpdf_oh oh)
1162 { 1162 {
1163 return do_with_oh<qpdf_oh>( 1163 return do_with_oh<qpdf_oh>(
1164 qpdf, oh, 1164 qpdf, oh,
1165 - [&qpdf](){ return qpdf_oh_new_array(qpdf); },  
1166 - [&qpdf](QPDFObjectHandle& qoh) { 1165 + [qpdf](){ return qpdf_oh_new_array(qpdf); },
  1166 + [qpdf](QPDFObjectHandle& qoh) {
1167 if (qoh.isArray()) 1167 if (qoh.isArray())
1168 { 1168 {
1169 QTC::TC("qpdf", "qpdf-c array to wrap_in_array"); 1169 QTC::TC("qpdf", "qpdf-c array to wrap_in_array");
@@ -1183,7 +1183,7 @@ qpdf_oh qpdf_oh_parse(qpdf_data qpdf, char const* object_str) @@ -1183,7 +1183,7 @@ qpdf_oh qpdf_oh_parse(qpdf_data qpdf, char const* object_str)
1183 { 1183 {
1184 QTC::TC("qpdf", "qpdf-c called qpdf_oh_parse"); 1184 QTC::TC("qpdf", "qpdf-c called qpdf_oh_parse");
1185 return trap_oh_errors<qpdf_oh>( 1185 return trap_oh_errors<qpdf_oh>(
1186 - qpdf, return_uninitialized(qpdf), [&object_str] (qpdf_data q) { 1186 + qpdf, return_uninitialized(qpdf), [object_str] (qpdf_data q) {
1187 return new_object(q, QPDFObjectHandle::parse(object_str)); 1187 return new_object(q, QPDFObjectHandle::parse(object_str));
1188 }); 1188 });
1189 } 1189 }
@@ -1236,7 +1236,7 @@ unsigned int qpdf_oh_get_uint_value_as_uint(qpdf_data qpdf, qpdf_oh oh) @@ -1236,7 +1236,7 @@ unsigned int qpdf_oh_get_uint_value_as_uint(qpdf_data qpdf, qpdf_oh oh)
1236 char const* qpdf_oh_get_real_value(qpdf_data qpdf, qpdf_oh oh) 1236 char const* qpdf_oh_get_real_value(qpdf_data qpdf, qpdf_oh oh)
1237 { 1237 {
1238 return do_with_oh<char const*>( 1238 return do_with_oh<char const*>(
1239 - qpdf, oh, return_T<char const*>(""), [&qpdf](QPDFObjectHandle& o) { 1239 + qpdf, oh, return_T<char const*>(""), [qpdf](QPDFObjectHandle& o) {
1240 QTC::TC("qpdf", "qpdf-c called qpdf_oh_get_real_value"); 1240 QTC::TC("qpdf", "qpdf-c called qpdf_oh_get_real_value");
1241 qpdf->tmp_string = o.getRealValue(); 1241 qpdf->tmp_string = o.getRealValue();
1242 return qpdf->tmp_string.c_str(); 1242 return qpdf->tmp_string.c_str();
@@ -1255,7 +1255,7 @@ double qpdf_oh_get_numeric_value(qpdf_data qpdf, qpdf_oh oh) @@ -1255,7 +1255,7 @@ double qpdf_oh_get_numeric_value(qpdf_data qpdf, qpdf_oh oh)
1255 char const* qpdf_oh_get_name(qpdf_data qpdf, qpdf_oh oh) 1255 char const* qpdf_oh_get_name(qpdf_data qpdf, qpdf_oh oh)
1256 { 1256 {
1257 return do_with_oh<char const*>( 1257 return do_with_oh<char const*>(
1258 - qpdf, oh, return_T<char const*>(""), [&qpdf](QPDFObjectHandle& o) { 1258 + qpdf, oh, return_T<char const*>(""), [qpdf](QPDFObjectHandle& o) {
1259 QTC::TC("qpdf", "qpdf-c called qpdf_oh_get_name"); 1259 QTC::TC("qpdf", "qpdf-c called qpdf_oh_get_name");
1260 qpdf->tmp_string = o.getName(); 1260 qpdf->tmp_string = o.getName();
1261 return qpdf->tmp_string.c_str(); 1261 return qpdf->tmp_string.c_str();
@@ -1265,7 +1265,7 @@ char const* qpdf_oh_get_name(qpdf_data qpdf, qpdf_oh oh) @@ -1265,7 +1265,7 @@ char const* qpdf_oh_get_name(qpdf_data qpdf, qpdf_oh oh)
1265 char const* qpdf_oh_get_string_value(qpdf_data qpdf, qpdf_oh oh) 1265 char const* qpdf_oh_get_string_value(qpdf_data qpdf, qpdf_oh oh)
1266 { 1266 {
1267 return do_with_oh<char const*>( 1267 return do_with_oh<char const*>(
1268 - qpdf, oh, return_T<char const*>(""), [&qpdf](QPDFObjectHandle& o) { 1268 + qpdf, oh, return_T<char const*>(""), [qpdf](QPDFObjectHandle& o) {
1269 QTC::TC("qpdf", "qpdf-c called qpdf_oh_get_string_value"); 1269 QTC::TC("qpdf", "qpdf-c called qpdf_oh_get_string_value");
1270 qpdf->tmp_string = o.getStringValue(); 1270 qpdf->tmp_string = o.getStringValue();
1271 return qpdf->tmp_string.c_str(); 1271 return qpdf->tmp_string.c_str();
@@ -1275,7 +1275,7 @@ char const* qpdf_oh_get_string_value(qpdf_data qpdf, qpdf_oh oh) @@ -1275,7 +1275,7 @@ char const* qpdf_oh_get_string_value(qpdf_data qpdf, qpdf_oh oh)
1275 char const* qpdf_oh_get_utf8_value(qpdf_data qpdf, qpdf_oh oh) 1275 char const* qpdf_oh_get_utf8_value(qpdf_data qpdf, qpdf_oh oh)
1276 { 1276 {
1277 return do_with_oh<char const*>( 1277 return do_with_oh<char const*>(
1278 - qpdf, oh, return_T<char const*>(""), [&qpdf](QPDFObjectHandle& o) { 1278 + qpdf, oh, return_T<char const*>(""), [qpdf](QPDFObjectHandle& o) {
1279 QTC::TC("qpdf", "qpdf-c called qpdf_oh_get_utf8_value"); 1279 QTC::TC("qpdf", "qpdf-c called qpdf_oh_get_utf8_value");
1280 qpdf->tmp_string = o.getUTF8Value(); 1280 qpdf->tmp_string = o.getUTF8Value();
1281 return qpdf->tmp_string.c_str(); 1281 return qpdf->tmp_string.c_str();
@@ -1294,7 +1294,7 @@ int qpdf_oh_get_array_n_items(qpdf_data qpdf, qpdf_oh oh) @@ -1294,7 +1294,7 @@ int qpdf_oh_get_array_n_items(qpdf_data qpdf, qpdf_oh oh)
1294 qpdf_oh qpdf_oh_get_array_item(qpdf_data qpdf, qpdf_oh oh, int n) 1294 qpdf_oh qpdf_oh_get_array_item(qpdf_data qpdf, qpdf_oh oh, int n)
1295 { 1295 {
1296 return do_with_oh<qpdf_oh>( 1296 return do_with_oh<qpdf_oh>(
1297 - qpdf, oh, return_null(qpdf), [&qpdf, &n](QPDFObjectHandle& o) { 1297 + qpdf, oh, return_null(qpdf), [qpdf, n](QPDFObjectHandle& o) {
1298 QTC::TC("qpdf", "qpdf-c called qpdf_oh_get_array_item"); 1298 QTC::TC("qpdf", "qpdf-c called qpdf_oh_get_array_item");
1299 return new_object(qpdf, o.getArrayItem(n)); 1299 return new_object(qpdf, o.getArrayItem(n));
1300 }); 1300 });
@@ -1336,7 +1336,7 @@ char const* qpdf_oh_dict_next_key(qpdf_data qpdf) @@ -1336,7 +1336,7 @@ char const* qpdf_oh_dict_next_key(qpdf_data qpdf)
1336 QPDF_BOOL qpdf_oh_has_key(qpdf_data qpdf, qpdf_oh oh, char const* key) 1336 QPDF_BOOL qpdf_oh_has_key(qpdf_data qpdf, qpdf_oh oh, char const* key)
1337 { 1337 {
1338 return do_with_oh<QPDF_BOOL>( 1338 return do_with_oh<QPDF_BOOL>(
1339 - qpdf, oh, return_false, [&key](QPDFObjectHandle& o) { 1339 + qpdf, oh, return_false, [key](QPDFObjectHandle& o) {
1340 QTC::TC("qpdf", "qpdf-c called qpdf_oh_has_key"); 1340 QTC::TC("qpdf", "qpdf-c called qpdf_oh_has_key");
1341 return o.hasKey(key); 1341 return o.hasKey(key);
1342 }); 1342 });
@@ -1345,7 +1345,7 @@ QPDF_BOOL qpdf_oh_has_key(qpdf_data qpdf, qpdf_oh oh, char const* key) @@ -1345,7 +1345,7 @@ QPDF_BOOL qpdf_oh_has_key(qpdf_data qpdf, qpdf_oh oh, char const* key)
1345 qpdf_oh qpdf_oh_get_key(qpdf_data qpdf, qpdf_oh oh, char const* key) 1345 qpdf_oh qpdf_oh_get_key(qpdf_data qpdf, qpdf_oh oh, char const* key)
1346 { 1346 {
1347 return do_with_oh<qpdf_oh>( 1347 return do_with_oh<qpdf_oh>(
1348 - qpdf, oh, return_null(qpdf), [&qpdf, &key](QPDFObjectHandle& o) { 1348 + qpdf, oh, return_null(qpdf), [qpdf, key](QPDFObjectHandle& o) {
1349 QTC::TC("qpdf", "qpdf-c called qpdf_oh_get_key"); 1349 QTC::TC("qpdf", "qpdf-c called qpdf_oh_get_key");
1350 return new_object(qpdf, o.getKey(key)); 1350 return new_object(qpdf, o.getKey(key));
1351 }); 1351 });
@@ -1354,7 +1354,7 @@ qpdf_oh qpdf_oh_get_key(qpdf_data qpdf, qpdf_oh oh, char const* key) @@ -1354,7 +1354,7 @@ qpdf_oh qpdf_oh_get_key(qpdf_data qpdf, qpdf_oh oh, char const* key)
1354 QPDF_BOOL qpdf_oh_is_or_has_name(qpdf_data qpdf, qpdf_oh oh, char const* key) 1354 QPDF_BOOL qpdf_oh_is_or_has_name(qpdf_data qpdf, qpdf_oh oh, char const* key)
1355 { 1355 {
1356 return do_with_oh<QPDF_BOOL>( 1356 return do_with_oh<QPDF_BOOL>(
1357 - qpdf, oh, return_false, [&key](QPDFObjectHandle& o) { 1357 + qpdf, oh, return_false, [key](QPDFObjectHandle& o) {
1358 QTC::TC("qpdf", "qpdf-c called qpdf_oh_is_or_has_name"); 1358 QTC::TC("qpdf", "qpdf-c called qpdf_oh_is_or_has_name");
1359 return o.isOrHasName(key); 1359 return o.isOrHasName(key);
1360 }); 1360 });
@@ -1441,7 +1441,7 @@ qpdf_oh qpdf_make_indirect_object(qpdf_data qpdf, qpdf_oh oh) @@ -1441,7 +1441,7 @@ qpdf_oh qpdf_make_indirect_object(qpdf_data qpdf, qpdf_oh oh)
1441 return do_with_oh<qpdf_oh>( 1441 return do_with_oh<qpdf_oh>(
1442 qpdf, oh, 1442 qpdf, oh,
1443 return_uninitialized(qpdf), 1443 return_uninitialized(qpdf),
1444 - [&qpdf](QPDFObjectHandle& o) { 1444 + [qpdf](QPDFObjectHandle& o) {
1445 return new_object(qpdf, qpdf->qpdf->makeIndirectObject(o)); 1445 return new_object(qpdf, qpdf->qpdf->makeIndirectObject(o));
1446 }); 1446 });
1447 } 1447 }
@@ -1461,7 +1461,7 @@ void qpdf_oh_set_array_item(qpdf_data qpdf, qpdf_oh oh, @@ -1461,7 +1461,7 @@ void qpdf_oh_set_array_item(qpdf_data qpdf, qpdf_oh oh,
1461 int at, qpdf_oh item) 1461 int at, qpdf_oh item)
1462 { 1462 {
1463 do_with_oh_void( 1463 do_with_oh_void(
1464 - qpdf, oh, [&qpdf, &at, &item](QPDFObjectHandle& o) { 1464 + qpdf, oh, [qpdf, at, item](QPDFObjectHandle& o) {
1465 QTC::TC("qpdf", "qpdf-c called qpdf_oh_set_array_item"); 1465 QTC::TC("qpdf", "qpdf-c called qpdf_oh_set_array_item");
1466 o.setArrayItem(at, qpdf_oh_item_internal(qpdf, item)); 1466 o.setArrayItem(at, qpdf_oh_item_internal(qpdf, item));
1467 }); 1467 });
@@ -1470,7 +1470,7 @@ void qpdf_oh_set_array_item(qpdf_data qpdf, qpdf_oh oh, @@ -1470,7 +1470,7 @@ void qpdf_oh_set_array_item(qpdf_data qpdf, qpdf_oh oh,
1470 void qpdf_oh_insert_item(qpdf_data qpdf, qpdf_oh oh, int at, qpdf_oh item) 1470 void qpdf_oh_insert_item(qpdf_data qpdf, qpdf_oh oh, int at, qpdf_oh item)
1471 { 1471 {
1472 do_with_oh_void( 1472 do_with_oh_void(
1473 - qpdf, oh, [&qpdf, &at, &item](QPDFObjectHandle& o) { 1473 + qpdf, oh, [qpdf, at, item](QPDFObjectHandle& o) {
1474 QTC::TC("qpdf", "qpdf-c called qpdf_oh_insert_item"); 1474 QTC::TC("qpdf", "qpdf-c called qpdf_oh_insert_item");
1475 o.insertItem(at, qpdf_oh_item_internal(qpdf, item)); 1475 o.insertItem(at, qpdf_oh_item_internal(qpdf, item));
1476 }); 1476 });
@@ -1479,7 +1479,7 @@ void qpdf_oh_insert_item(qpdf_data qpdf, qpdf_oh oh, int at, qpdf_oh item) @@ -1479,7 +1479,7 @@ void qpdf_oh_insert_item(qpdf_data qpdf, qpdf_oh oh, int at, qpdf_oh item)
1479 void qpdf_oh_append_item(qpdf_data qpdf, qpdf_oh oh, qpdf_oh item) 1479 void qpdf_oh_append_item(qpdf_data qpdf, qpdf_oh oh, qpdf_oh item)
1480 { 1480 {
1481 do_with_oh_void( 1481 do_with_oh_void(
1482 - qpdf, oh, [&qpdf, &item](QPDFObjectHandle& o) { 1482 + qpdf, oh, [qpdf, item](QPDFObjectHandle& o) {
1483 QTC::TC("qpdf", "qpdf-c called qpdf_oh_append_item"); 1483 QTC::TC("qpdf", "qpdf-c called qpdf_oh_append_item");
1484 o.appendItem(qpdf_oh_item_internal(qpdf, item)); 1484 o.appendItem(qpdf_oh_item_internal(qpdf, item));
1485 }); 1485 });
@@ -1488,7 +1488,7 @@ void qpdf_oh_append_item(qpdf_data qpdf, qpdf_oh oh, qpdf_oh item) @@ -1488,7 +1488,7 @@ void qpdf_oh_append_item(qpdf_data qpdf, qpdf_oh oh, qpdf_oh item)
1488 void qpdf_oh_erase_item(qpdf_data qpdf, qpdf_oh oh, int at) 1488 void qpdf_oh_erase_item(qpdf_data qpdf, qpdf_oh oh, int at)
1489 { 1489 {
1490 do_with_oh_void( 1490 do_with_oh_void(
1491 - qpdf, oh, [&at](QPDFObjectHandle& o) { 1491 + qpdf, oh, [at](QPDFObjectHandle& o) {
1492 QTC::TC("qpdf", "qpdf-c called qpdf_oh_erase_item"); 1492 QTC::TC("qpdf", "qpdf-c called qpdf_oh_erase_item");
1493 o.eraseItem(at); 1493 o.eraseItem(at);
1494 }); 1494 });
@@ -1498,7 +1498,7 @@ void qpdf_oh_replace_key(qpdf_data qpdf, qpdf_oh oh, @@ -1498,7 +1498,7 @@ void qpdf_oh_replace_key(qpdf_data qpdf, qpdf_oh oh,
1498 char const* key, qpdf_oh item) 1498 char const* key, qpdf_oh item)
1499 { 1499 {
1500 do_with_oh_void( 1500 do_with_oh_void(
1501 - qpdf, oh, [&qpdf, &key, &item](QPDFObjectHandle& o) { 1501 + qpdf, oh, [qpdf, key, item](QPDFObjectHandle& o) {
1502 QTC::TC("qpdf", "qpdf-c called qpdf_oh_replace_key"); 1502 QTC::TC("qpdf", "qpdf-c called qpdf_oh_replace_key");
1503 o.replaceKey(key, qpdf_oh_item_internal(qpdf, item)); 1503 o.replaceKey(key, qpdf_oh_item_internal(qpdf, item));
1504 }); 1504 });
@@ -1507,7 +1507,7 @@ void qpdf_oh_replace_key(qpdf_data qpdf, qpdf_oh oh, @@ -1507,7 +1507,7 @@ void qpdf_oh_replace_key(qpdf_data qpdf, qpdf_oh oh,
1507 void qpdf_oh_remove_key(qpdf_data qpdf, qpdf_oh oh, char const* key) 1507 void qpdf_oh_remove_key(qpdf_data qpdf, qpdf_oh oh, char const* key)
1508 { 1508 {
1509 do_with_oh_void( 1509 do_with_oh_void(
1510 - qpdf, oh, [&key](QPDFObjectHandle& o) { 1510 + qpdf, oh, [key](QPDFObjectHandle& o) {
1511 QTC::TC("qpdf", "qpdf-c called qpdf_oh_remove_key"); 1511 QTC::TC("qpdf", "qpdf-c called qpdf_oh_remove_key");
1512 o.removeKey(key); 1512 o.removeKey(key);
1513 }); 1513 });
@@ -1517,7 +1517,7 @@ void qpdf_oh_replace_or_remove_key(qpdf_data qpdf, qpdf_oh oh, @@ -1517,7 +1517,7 @@ void qpdf_oh_replace_or_remove_key(qpdf_data qpdf, qpdf_oh oh,
1517 char const* key, qpdf_oh item) 1517 char const* key, qpdf_oh item)
1518 { 1518 {
1519 do_with_oh_void( 1519 do_with_oh_void(
1520 - qpdf, oh, [&qpdf, &key, &item](QPDFObjectHandle& o) { 1520 + qpdf, oh, [qpdf, key, item](QPDFObjectHandle& o) {
1521 QTC::TC("qpdf", "qpdf-c called qpdf_oh_replace_or_remove_key"); 1521 QTC::TC("qpdf", "qpdf-c called qpdf_oh_replace_or_remove_key");
1522 o.replaceOrRemoveKey(key, qpdf_oh_item_internal(qpdf, item)); 1522 o.replaceOrRemoveKey(key, qpdf_oh_item_internal(qpdf, item));
1523 }); 1523 });
@@ -1526,7 +1526,7 @@ void qpdf_oh_replace_or_remove_key(qpdf_data qpdf, qpdf_oh oh, @@ -1526,7 +1526,7 @@ void qpdf_oh_replace_or_remove_key(qpdf_data qpdf, qpdf_oh oh,
1526 qpdf_oh qpdf_oh_get_dict(qpdf_data qpdf, qpdf_oh oh) 1526 qpdf_oh qpdf_oh_get_dict(qpdf_data qpdf, qpdf_oh oh)
1527 { 1527 {
1528 return do_with_oh<qpdf_oh>( 1528 return do_with_oh<qpdf_oh>(
1529 - qpdf, oh, return_null(qpdf), [&qpdf](QPDFObjectHandle& o) { 1529 + qpdf, oh, return_null(qpdf), [qpdf](QPDFObjectHandle& o) {
1530 QTC::TC("qpdf", "qpdf-c called qpdf_oh_get_dict"); 1530 QTC::TC("qpdf", "qpdf-c called qpdf_oh_get_dict");
1531 return new_object(qpdf, o.getDict()); 1531 return new_object(qpdf, o.getDict());
1532 }); 1532 });
@@ -1553,7 +1553,7 @@ int qpdf_oh_get_generation(qpdf_data qpdf, qpdf_oh oh) @@ -1553,7 +1553,7 @@ int qpdf_oh_get_generation(qpdf_data qpdf, qpdf_oh oh)
1553 char const* qpdf_oh_unparse(qpdf_data qpdf, qpdf_oh oh) 1553 char const* qpdf_oh_unparse(qpdf_data qpdf, qpdf_oh oh)
1554 { 1554 {
1555 return do_with_oh<char const*>( 1555 return do_with_oh<char const*>(
1556 - qpdf, oh, return_T<char const*>(""), [&qpdf](QPDFObjectHandle& o) { 1556 + qpdf, oh, return_T<char const*>(""), [qpdf](QPDFObjectHandle& o) {
1557 QTC::TC("qpdf", "qpdf-c called qpdf_oh_unparse"); 1557 QTC::TC("qpdf", "qpdf-c called qpdf_oh_unparse");
1558 qpdf->tmp_string = o.unparse(); 1558 qpdf->tmp_string = o.unparse();
1559 return qpdf->tmp_string.c_str(); 1559 return qpdf->tmp_string.c_str();
@@ -1563,7 +1563,7 @@ char const* qpdf_oh_unparse(qpdf_data qpdf, qpdf_oh oh) @@ -1563,7 +1563,7 @@ char const* qpdf_oh_unparse(qpdf_data qpdf, qpdf_oh oh)
1563 char const* qpdf_oh_unparse_resolved(qpdf_data qpdf, qpdf_oh oh) 1563 char const* qpdf_oh_unparse_resolved(qpdf_data qpdf, qpdf_oh oh)
1564 { 1564 {
1565 return do_with_oh<char const*>( 1565 return do_with_oh<char const*>(
1566 - qpdf, oh, return_T<char const*>(""), [&qpdf](QPDFObjectHandle& o) { 1566 + qpdf, oh, return_T<char const*>(""), [qpdf](QPDFObjectHandle& o) {
1567 QTC::TC("qpdf", "qpdf-c called qpdf_oh_unparse_resolved"); 1567 QTC::TC("qpdf", "qpdf-c called qpdf_oh_unparse_resolved");
1568 qpdf->tmp_string = o.unparseResolved(); 1568 qpdf->tmp_string = o.unparseResolved();
1569 return qpdf->tmp_string.c_str(); 1569 return qpdf->tmp_string.c_str();
@@ -1573,7 +1573,7 @@ char const* qpdf_oh_unparse_resolved(qpdf_data qpdf, qpdf_oh oh) @@ -1573,7 +1573,7 @@ char const* qpdf_oh_unparse_resolved(qpdf_data qpdf, qpdf_oh oh)
1573 char const* qpdf_oh_unparse_binary(qpdf_data qpdf, qpdf_oh oh) 1573 char const* qpdf_oh_unparse_binary(qpdf_data qpdf, qpdf_oh oh)
1574 { 1574 {
1575 return do_with_oh<char const*>( 1575 return do_with_oh<char const*>(
1576 - qpdf, oh, return_T<char const*>(""), [&qpdf](QPDFObjectHandle& o) { 1576 + qpdf, oh, return_T<char const*>(""), [qpdf](QPDFObjectHandle& o) {
1577 QTC::TC("qpdf", "qpdf-c called qpdf_oh_unparse_binary"); 1577 QTC::TC("qpdf", "qpdf-c called qpdf_oh_unparse_binary");
1578 qpdf->tmp_string = o.unparseBinary(); 1578 qpdf->tmp_string = o.unparseBinary();
1579 return qpdf->tmp_string.c_str(); 1579 return qpdf->tmp_string.c_str();