mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#4172 libecl : Return std::string instead of NULL
libecl crashes when NULL is returned from a function returning std::string
This commit is contained in:
parent
11ae710be9
commit
b120d0a2c1
10
ThirdParty/Ert/lib/ecl/smspec_node.cpp
vendored
10
ThirdParty/Ert/lib/ecl/smspec_node.cpp
vendored
@ -188,7 +188,7 @@ std::string smspec_alloc_completion_ijk_key( const char * join_string , const st
|
||||
join_string ,
|
||||
i , j , k );
|
||||
else
|
||||
return NULL;
|
||||
return std::string();
|
||||
}
|
||||
|
||||
|
||||
@ -202,7 +202,7 @@ std::string smspec_alloc_completion_num_key( const char * join_string , const st
|
||||
join_string ,
|
||||
num );
|
||||
else
|
||||
return NULL;
|
||||
return std::string();
|
||||
}
|
||||
|
||||
/*
|
||||
@ -265,7 +265,7 @@ std::string smspec_alloc_segment_key( const char * join_string , const std::stri
|
||||
join_string ,
|
||||
num );
|
||||
else
|
||||
return NULL;
|
||||
return std::string();
|
||||
}
|
||||
|
||||
|
||||
@ -278,7 +278,7 @@ std::string smspec_alloc_local_well_key( const char * join_string , const std::s
|
||||
join_string ,
|
||||
wgname.c_str());
|
||||
else
|
||||
return NULL;
|
||||
return std::string();
|
||||
}
|
||||
|
||||
std::string smspec_alloc_local_completion_key( const char * join_string, const std::string& keyword , const std::string& lgr_name , const std::string& wgname , int i , int j , int k) {
|
||||
@ -292,7 +292,7 @@ std::string smspec_alloc_local_completion_key( const char * join_string, const s
|
||||
join_string ,
|
||||
i,j,k);
|
||||
else
|
||||
return NULL;
|
||||
return std::string();
|
||||
}
|
||||
|
||||
/*****************************************************************/
|
||||
|
Loading…
Reference in New Issue
Block a user