Skip to content

Commit d4896e8

Browse files
committed
Fix schema evolution read rule for RooDoubleCBFast to use placement new
- debugged with Claude
1 parent 53b8ab3 commit d4896e8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/classes_def.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -226,10 +226,10 @@
226226
target="">
227227
<![CDATA[
228228
std::cout << \"Translating RooDoubleCBFast using proper constructor\" << std::endl;
229-
auto newName = newObj->GetName();
230-
auto newTitle = newObj->GetTitle();
231-
delete newObj;
232-
newObj = new RooDoubleCBFast(newName, newTitle,
229+
std::string newName(newObj->GetName());
230+
std::string newTitle(newObj->GetTitle());
231+
newObj->~RooDoubleCBFast();
232+
new (newObj) RooDoubleCBFast(newName.c_str(), newTitle.c_str(),
233233
const_cast<RooAbsReal&>(onfile.x.arg()),
234234
const_cast<RooAbsReal&>(onfile.mean.arg()),
235235
const_cast<RooAbsReal&>(onfile.width.arg()),

0 commit comments

Comments
 (0)