mirror of
https://github.com/nasa/trick.git
synced 2024-12-18 20:57:55 +00:00
In MemoryManager change delete_var(const char*) to delete_var(std::string) (#1687)
This commit is contained in:
parent
d40bc12570
commit
04822023de
@ -309,7 +309,7 @@ namespace Trick {
|
||||
@param var_name - the address of the variable.
|
||||
@return 0 = SUCCESS, 1 = FAILURE
|
||||
*/
|
||||
int delete_var(const char* var_name);
|
||||
int delete_var(std::string var_name);
|
||||
|
||||
/**
|
||||
Forget about the external variable at the given address. DOES NOT attempt to deallocate the
|
||||
@ -325,7 +325,7 @@ namespace Trick {
|
||||
@param var_name - the address of the external variable.
|
||||
@return 0 = SUCCESS, 1 = FAILURE
|
||||
*/
|
||||
int delete_extern_var(const char* var_name);
|
||||
int delete_extern_var(std::string var_name);
|
||||
|
||||
/**
|
||||
Checkpoint all allocations known to the MemoryManager to the given stream.
|
||||
|
@ -110,7 +110,7 @@ int Trick::MemoryManager::delete_var(void* address ) {
|
||||
}
|
||||
|
||||
// MEMBER FUNCTION
|
||||
int Trick::MemoryManager::delete_var( const char* name) {
|
||||
int Trick::MemoryManager::delete_var( std::string name) {
|
||||
|
||||
VARIABLE_MAP::iterator pos;
|
||||
ALLOC_INFO *alloc_info;
|
||||
@ -140,7 +140,7 @@ int Trick::MemoryManager::delete_extern_var( void* address) {
|
||||
}
|
||||
|
||||
// MEMBER FUNCTION
|
||||
int Trick::MemoryManager::delete_extern_var( const char* name) {
|
||||
int Trick::MemoryManager::delete_extern_var( std::string name) {
|
||||
// delete_var will remove the external variable from the allocation map
|
||||
return delete_var(name) ;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user