remove deprecated std::ptr_fun and std::not1 closes #864

This commit is contained in:
Scott Fennell 2019-09-23 14:25:27 -05:00
parent 238b376b14
commit f10e4e8d93
5 changed files with 30 additions and 30 deletions

View File

@ -48,7 +48,7 @@ int checkpoint_map_ik_id(STL & in_map , std::string object_name , std::string va
typename STL::mapped_type * items = nullptr ;
cont_size = in_map.size() ;
std::replace_if(object_name.begin(), object_name.end(), std::ptr_fun<int,int>(&std::ispunct), '_');
std::replace_if(object_name.begin(), object_name.end(), static_cast<int (*)(int)>(std::ispunct), '_');
if ( cont_size > 0 ) {
std::string type_string ;
@ -119,7 +119,7 @@ int checkpoint_map_ik_sd(STL & in_map , std::string object_name , std::string va
std::string * items = nullptr ;
cont_size = in_map.size() ;
std::replace_if(object_name.begin(), object_name.end(), std::ptr_fun<int,int>(&std::ispunct), '_');
std::replace_if(object_name.begin(), object_name.end(), static_cast<int (*)(int)>(std::ispunct), '_');
if ( cont_size > 0 ) {
std::string type_string ;
@ -192,7 +192,7 @@ int checkpoint_map_sk_id(STL & in_map , std::string object_name , std::string va
typename STL::mapped_type * items = nullptr ;
cont_size = in_map.size() ;
std::replace_if(object_name.begin(), object_name.end(), std::ptr_fun<int,int>(&std::ispunct), '_');
std::replace_if(object_name.begin(), object_name.end(), static_cast<int (*)(int)>(std::ispunct), '_');
if ( cont_size > 0 ) {
var_declare << "std::string "
@ -264,7 +264,7 @@ int checkpoint_map_stl_sk_sd(STL & in_map , std::string object_name , std::strin
std::string * items = nullptr ;
cont_size = in_map.size() ;
std::replace_if(object_name.begin(), object_name.end(), std::ptr_fun<int,int>(&std::ispunct), '_');
std::replace_if(object_name.begin(), object_name.end(), static_cast<int (*)(int)>(std::ispunct), '_');
if ( cont_size > 0 ) {
var_declare << "std::string "
@ -323,7 +323,7 @@ int checkpoint_stl(std::multimap<KEY,DATA,_Compare,_Alloc> & in_map , std::strin
template <class STL>
int delete_map_allocs(STL & in_map __attribute__ ((unused)), std::string object_name , std::string var_name ) {
std::replace_if(object_name.begin(), object_name.end(), std::ptr_fun<int,int>(&std::ispunct), '_');
std::replace_if(object_name.begin(), object_name.end(), static_cast<int (*)(int)>(std::ispunct), '_');
REF2 * items_ref ;
items_ref = ref_attributes((char *)(object_name + std::string("_") + var_name + std::string("_keys")).c_str()) ;
if ( items_ref != NULL ) {
@ -364,7 +364,7 @@ int restore_map_ik_id(STL & in_map , std::string object_name , std::string var_n
//message_publish(1, "in regular map template restore\n") ;
std::replace_if(object_name.begin(), object_name.end(), std::ptr_fun<int,int>(&std::ispunct), '_');
std::replace_if(object_name.begin(), object_name.end(), static_cast<int (*)(int)>(std::ispunct), '_');
keys_ref = ref_attributes((char *)(object_name + "_" + var_name + "_keys").c_str()) ;
items_ref = ref_attributes((char *)(object_name + "_" + var_name + "_data").c_str()) ;
@ -410,7 +410,7 @@ int restore_map_ik_sd(STL & in_map , std::string object_name , std::string var_n
//message_publish(1, "in regular map template restore\n") ;
std::replace_if(object_name.begin(), object_name.end(), std::ptr_fun<int,int>(&std::ispunct), '_');
std::replace_if(object_name.begin(), object_name.end(), static_cast<int (*)(int)>(std::ispunct), '_');
keys_ref = ref_attributes((char *)(object_name + "_" + var_name + "_keys").c_str()) ;
items_ref = ref_attributes((char *)(object_name + "_" + var_name + "_data").c_str()) ;
@ -460,7 +460,7 @@ int restore_map_sk_id(STL & in_map , std::string object_name , std::string var_n
//message_publish(1, "in regular map template restore\n") ;
std::replace_if(object_name.begin(), object_name.end(), std::ptr_fun<int,int>(&std::ispunct), '_');
std::replace_if(object_name.begin(), object_name.end(), static_cast<int (*)(int)>(std::ispunct), '_');
keys_ref = ref_attributes((char *)(object_name + "_" + var_name + "_keys").c_str()) ;
items_ref = ref_attributes((char *)(object_name + "_" + var_name + "_data").c_str()) ;
@ -510,7 +510,7 @@ int restore_map_sk_sd(STL & in_map , std::string object_name , std::string var_n
//message_publish(1, "in regular map template restore\n") ;
std::replace_if(object_name.begin(), object_name.end(), std::ptr_fun<int,int>(&std::ispunct), '_');
std::replace_if(object_name.begin(), object_name.end(), static_cast<int (*)(int)>(std::ispunct), '_');
keys_ref = ref_attributes((char *)(object_name + "_" + var_name + "_keys").c_str()) ;
items_ref = ref_attributes((char *)(object_name + "_" + var_name + "_data").c_str()) ;

View File

@ -40,7 +40,7 @@ int checkpoint_stl(std::queue<ITEM_TYPE,_Sequence> & in_stl , std::string object
std::queue<ITEM_TYPE,_Sequence> temp_queue(in_stl) ;
cont_size = temp_queue.size() ;
std::replace_if(object_name.begin(), object_name.end(), std::ptr_fun<int,int>(&std::ispunct), '_');
std::replace_if(object_name.begin(), object_name.end(), static_cast<int (*)(int)>(std::ispunct), '_');
if ( cont_size > 0 ) {
std::string type_string;
@ -80,7 +80,7 @@ int checkpoint_stl(std::queue<ITEM_TYPE,_Sequence> & in_stl , std::string object
std::queue<ITEM_TYPE,_Sequence> temp_queue(in_stl) ;
cont_size = temp_queue.size() ;
std::replace_if(object_name.begin(), object_name.end(), std::ptr_fun<int,int>(&std::ispunct), '_');
std::replace_if(object_name.begin(), object_name.end(), static_cast<int (*)(int)>(std::ispunct), '_');
if ( cont_size > 0 ) {
var_declare << "std::string "
@ -119,7 +119,7 @@ int checkpoint_stl(std::priority_queue<ITEM_TYPE, _Container, _Compare> & in_stl
std::priority_queue<ITEM_TYPE,_Container,_Compare> temp_queue(in_stl) ;
cont_size = temp_queue.size() ;
std::replace_if(object_name.begin(), object_name.end(), std::ptr_fun<int,int>(&std::ispunct), '_');
std::replace_if(object_name.begin(), object_name.end(), static_cast<int (*)(int)>(std::ispunct), '_');
if ( cont_size > 0 ) {
std::string type_string;
@ -160,7 +160,7 @@ int checkpoint_stl(std::priority_queue<ITEM_TYPE, _Container, _Compare> & in_stl
std::priority_queue<ITEM_TYPE,_Container,_Compare> temp_queue(in_stl) ;
cont_size = temp_queue.size() ;
std::replace_if(object_name.begin(), object_name.end(), std::ptr_fun<int,int>(&std::ispunct), '_');
std::replace_if(object_name.begin(), object_name.end(), static_cast<int (*)(int)>(std::ispunct), '_');
if ( cont_size > 0 ) {
var_declare << "std::string "
@ -218,7 +218,7 @@ int restore_stl(std::queue<ITEM_TYPE,_Sequence> & in_stl , std::string object_na
REF2 * items_ref ;
ITEM_TYPE * items ;
std::replace_if(object_name.begin(), object_name.end(), std::ptr_fun<int,int>(&std::ispunct), '_');
std::replace_if(object_name.begin(), object_name.end(), static_cast<int (*)(int)>(std::ispunct), '_');
//message_publish(1, "RESTORE_STL_queue %s_%s\n", object_name.c_str() , var_name.c_str()) ;
@ -250,7 +250,7 @@ int restore_stl(std::queue<ITEM_TYPE,_Sequence> & in_stl , std::string object_na
REF2 * items_ref ;
std::string * items ;
std::replace_if(object_name.begin(), object_name.end(), std::ptr_fun<int,int>(&std::ispunct), '_');
std::replace_if(object_name.begin(), object_name.end(), static_cast<int (*)(int)>(std::ispunct), '_');
//message_publish(1, "RESTORE_STL_queue %s_%s\n", object_name.c_str() , var_name.c_str()) ;
@ -287,7 +287,7 @@ int restore_stl(std::priority_queue<ITEM_TYPE,_Container,_Compare> & in_stl ,
REF2 * items_ref ;
ITEM_TYPE * items ;
std::replace_if(object_name.begin(), object_name.end(), std::ptr_fun<int,int>(&std::ispunct), '_');
std::replace_if(object_name.begin(), object_name.end(), static_cast<int (*)(int)>(std::ispunct), '_');
//message_publish(1, "RESTORE_STL_queue %s_%s\n", object_name.c_str() , var_name.c_str()) ;
@ -320,7 +320,7 @@ int restore_stl(std::priority_queue<ITEM_TYPE,_Container,_Compare> & in_stl ,
REF2 * items_ref ;
std::string * items ;
std::replace_if(object_name.begin(), object_name.end(), std::ptr_fun<int,int>(&std::ispunct), '_');
std::replace_if(object_name.begin(), object_name.end(), static_cast<int (*)(int)>(std::ispunct), '_');
//message_publish(1, "RESTORE_STL_queue %s_%s\n", object_name.c_str() , var_name.c_str()) ;

View File

@ -43,7 +43,7 @@ int checkpoint_sequence_i(STL & in_stl , std::string object_name , std::string v
//message_publish(1, "%s\n", __PRETTY_FUNCTION__) ;
cont_size = in_stl.size() ;
std::replace_if(object_name.begin(), object_name.end(), std::ptr_fun<int,int>(&std::ispunct), '_');
std::replace_if(object_name.begin(), object_name.end(), static_cast<int (*)(int)>(std::ispunct), '_');
if ( cont_size > 0 ) {
std::string type_string;
@ -84,7 +84,7 @@ int checkpoint_sequence_s(STL & in_stl , std::string object_name , std::string v
cont_size = in_stl.size() ;
std::replace_if(object_name.begin(), object_name.end(), std::ptr_fun<int,int>(&std::ispunct), '_');
std::replace_if(object_name.begin(), object_name.end(), static_cast<int (*)(int)>(std::ispunct), '_');
//message_publish(1, "%s\n", __PRETTY_FUNCTION__) ;
@ -214,7 +214,7 @@ int checkpoint_stl(std::multiset<ITEM_TYPE,_Alloc> & in_stl , std::string object
template <class STL>
int delete_sequence_alloc(STL & in_stl __attribute__ ((unused)), std::string object_name , std::string var_name ) {
std::replace_if(object_name.begin(), object_name.end(), std::ptr_fun<int,int>(&std::ispunct), '_');
std::replace_if(object_name.begin(), object_name.end(), static_cast<int (*)(int)>(std::ispunct), '_');
REF2 * items_ref ;
items_ref = ref_attributes((char *)(object_name + std::string("_") + var_name).c_str()) ;
if ( items_ref != NULL ) {
@ -270,7 +270,7 @@ int restore_sequence_i(STL & in_stl , std::string object_name , std::string var_
REF2 * items_ref ;
typename STL::value_type * items ;
std::replace_if(object_name.begin(), object_name.end(), std::ptr_fun<int,int>(&std::ispunct), '_');
std::replace_if(object_name.begin(), object_name.end(), static_cast<int (*)(int)>(std::ispunct), '_');
//message_publish(1, "RESTORE_SEQUENCE_STL %s_%s\n", object_name.c_str() , var_name.c_str()) ;
@ -298,7 +298,7 @@ int restore_sequence_s(STL & in_stl , std::string object_name , std::string var_
REF2 * items_ref ;
std::string * items ;
std::replace_if(object_name.begin(), object_name.end(), std::ptr_fun<int,int>(&std::ispunct), '_');
std::replace_if(object_name.begin(), object_name.end(), static_cast<int (*)(int)>(std::ispunct), '_');
//message_publish(1, "%s\n", __PRETTY_FUNCTION__) ;
@ -334,7 +334,7 @@ int restore_stl(std::array<ITEM_TYPE,N> & in_stl , std::string object_name , std
REF2 * items_ref ;
std::string * items ;
std::replace_if(object_name.begin(), object_name.end(), std::ptr_fun<int,int>(&std::ispunct), '_');
std::replace_if(object_name.begin(), object_name.end(), static_cast<int (*)(int)>(std::ispunct), '_');
//message_publish(1, "%s\n", __PRETTY_FUNCTION__) ;
@ -366,7 +366,7 @@ int restore_stl(std::array<ITEM_TYPE,N> & in_stl , std::string object_name , std
REF2 * items_ref ;
typename std::array<ITEM_TYPE,N>::value_type * items ;
std::replace_if(object_name.begin(), object_name.end(), std::ptr_fun<int,int>(&std::ispunct), '_');
std::replace_if(object_name.begin(), object_name.end(), static_cast<int (*)(int)>(std::ispunct), '_');
//message_publish(1, "RESTORE_SEQUENCE_STL %s_%s\n", object_name.c_str() , var_name.c_str()) ;

View File

@ -37,7 +37,7 @@ int checkpoint_stl(std::stack<ITEM_TYPE,_Sequence> & in_stl , std::string object
std::stack<ITEM_TYPE,_Sequence> temp_stack(in_stl) ;
cont_size = temp_stack.size() ;
std::replace_if(object_name.begin(), object_name.end(), std::ptr_fun<int,int>(&std::ispunct), '_');
std::replace_if(object_name.begin(), object_name.end(), static_cast<int (*)(int)>(std::ispunct), '_');
if ( cont_size > 0 ) {
std::string type_string;
@ -77,7 +77,7 @@ int checkpoint_stl(std::stack<ITEM_TYPE,_Sequence> & in_stl , std::string object
std::stack<ITEM_TYPE,_Sequence> temp_stack(in_stl) ;
cont_size = temp_stack.size() ;
std::replace_if(object_name.begin(), object_name.end(), std::ptr_fun<int,int>(&std::ispunct), '_');
std::replace_if(object_name.begin(), object_name.end(), static_cast<int (*)(int)>(std::ispunct), '_');
if ( cont_size > 0 ) {
var_declare << "std::string "
@ -127,7 +127,7 @@ int restore_stl(std::stack<ITEM_TYPE,_Sequence> & in_stl , std::string object_na
REF2 * items_ref ;
ITEM_TYPE * items = nullptr ;
std::replace_if(object_name.begin(), object_name.end(), std::ptr_fun<int,int>(&std::ispunct), '_');
std::replace_if(object_name.begin(), object_name.end(), static_cast<int (*)(int)>(std::ispunct), '_');
//message_publish(1, "RESTORE_STL_STACK %s_%s\n", object_name.c_str() , var_name.c_str()) ;
@ -158,7 +158,7 @@ int restore_stl(std::stack<ITEM_TYPE,_Sequence> & in_stl , std::string object_na
REF2 * items_ref ;
std::string * items = nullptr ;
std::replace_if(object_name.begin(), object_name.end(), std::ptr_fun<int,int>(&std::ispunct), '_');
std::replace_if(object_name.begin(), object_name.end(), static_cast<int (*)(int)>(std::ispunct), '_');
//message_publish(1, "RESTORE_STL_STACK %s_%s\n", object_name.c_str() , var_name.c_str()) ;

View File

@ -348,8 +348,8 @@ bool CXXRecordVisitor::isPrivateEmbeddedClass( std::string in_name ) {
in_name.erase(in_name.find_first_of("[*")) ;
}
// remove trailing spaces
in_name.erase(std::find_if(in_name.rbegin(), in_name.rend(),
std::not1(std::ptr_fun<int, int>(std::isspace))).base(), in_name.end());
in_name.erase(std::find_if(in_name.rbegin(), in_name.rend(),
[](int c) {return !std::isspace(c);}).base(), in_name.end());
// remove all template arguments "<text>"
bool template_arg_found ;