Skip to content

Commit

Permalink
In MemoryManager change delete_var(const char*) to delete_var(std::st…
Browse files Browse the repository at this point in the history
…ring) (#1687)
  • Loading branch information
jmpenn authored Apr 4, 2024
1 parent d40bc12 commit 0482202
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions include/trick/MemoryManager.hh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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) ;
}
Expand Down

0 comments on commit 0482202

Please sign in to comment.