In MemoryManager change delete_var(const char*) to delete_var(std::string)

This commit is contained in:
John M. Penn 2024-04-03 12:17:41 -05:00
parent f475627ef7
commit 7ceb4c34a7
2 changed files with 4 additions and 4 deletions

View File

@ -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.

View File

@ -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) ;
}