- std::vector<Modifier*> Modifiers;
- std::unique_ptr<Modifier> LM(new LoadModifier(BB, &PT, &R));
- std::unique_ptr<Modifier> SM(new StoreModifier(BB, &PT, &R));
- std::unique_ptr<Modifier> EE(new ExtractElementModifier(BB, &PT, &R));
- std::unique_ptr<Modifier> SHM(new ShuffModifier(BB, &PT, &R));
- std::unique_ptr<Modifier> IE(new InsertElementModifier(BB, &PT, &R));
- std::unique_ptr<Modifier> BM(new BinModifier(BB, &PT, &R));
- std::unique_ptr<Modifier> CM(new CastModifier(BB, &PT, &R));
- std::unique_ptr<Modifier> SLM(new SelectModifier(BB, &PT, &R));
- std::unique_ptr<Modifier> PM(new CmpModifier(BB, &PT, &R));
- Modifiers.push_back(LM.get());
- Modifiers.push_back(SM.get());
- Modifiers.push_back(EE.get());
- Modifiers.push_back(SHM.get());
- Modifiers.push_back(IE.get());
- Modifiers.push_back(BM.get());
- Modifiers.push_back(CM.get());
- Modifiers.push_back(SLM.get());
- Modifiers.push_back(PM.get());
+ std::vector<std::unique_ptr<Modifier>> Modifiers;
+ Modifiers.emplace_back(new LoadModifier(BB, &PT, &R));
+ Modifiers.emplace_back(new StoreModifier(BB, &PT, &R));
+ auto SM = Modifiers.back().get();
+ Modifiers.emplace_back(new ExtractElementModifier(BB, &PT, &R));
+ Modifiers.emplace_back(new ShuffModifier(BB, &PT, &R));
+ Modifiers.emplace_back(new InsertElementModifier(BB, &PT, &R));
+ Modifiers.emplace_back(new BinModifier(BB, &PT, &R));
+ Modifiers.emplace_back(new CastModifier(BB, &PT, &R));
+ Modifiers.emplace_back(new SelectModifier(BB, &PT, &R));
+ Modifiers.emplace_back(new CmpModifier(BB, &PT, &R));