diff --git a/Calorimeter/CaloIdentifier/src/TileNeighbour.cxx b/Calorimeter/CaloIdentifier/src/TileNeighbour.cxx index b8b753b3d74fc58ed845404fbaba660aa6c0b57d..8e47b660f3b8b2aa97c4285f0c496d4f7340cedd 100755 --- a/Calorimeter/CaloIdentifier/src/TileNeighbour.cxx +++ b/Calorimeter/CaloIdentifier/src/TileNeighbour.cxx @@ -564,8 +564,7 @@ int TileNeighbour::next_samp_wide (const IdentifierHash & id, void TileNeighbour::get_id(std::string & strName, Identifier & id, const Tile_Base_ID* tileID) { - char * name = new char[strName.size()+1]; - strcpy(name,strName.data()); + const char * name = strName.c_str(); int se; int sd; int sm; @@ -610,8 +609,6 @@ void TileNeighbour::get_id(std::string & strName, Identifier & id, const Tile_Ba } id = tileID->cell_id(se,sd,0,tw,sm); - - delete[] name; } void TileNeighbour::get_name(Identifier & id, std::string & strSection,