Code style improvements

This commit is contained in:
Jack Andersen 2019-09-30 21:34:12 -10:00
parent 5da58eb1da
commit 5d4abb5fb1
8 changed files with 175 additions and 175 deletions

View File

@ -651,7 +651,7 @@ void ProjectModel::saveSongsIndex() {
QFileInfo songsFile(m_dir, QStringLiteral("!songs.yaml"));
athena::io::YAMLDocWriter dw("amuse::Songs");
for (auto& p : amuse::SortUnorderedMap(m_midiFiles))
dw.writeString(fmt::format(fmt("{}"), p.first).c_str(), p.second.get().m_path.toUtf8().data());
dw.writeString(fmt::format(fmt("{}"), p.first), p.second.get().m_path.toUtf8().data());
athena::io::FileWriter w(QStringToSysString(songsFile.filePath()));
if (!w.hasError())
dw.finish(&w);
@ -1592,7 +1592,7 @@ static void WriteMimeYAML(athena::io::YAMLDocWriter& w, ProjectModel::CurveNode*
static void WriteMimeYAML(athena::io::YAMLDocWriter& w, ProjectModel::KeymapNode* n) {
if (auto __v = w.enterSubVector("entries")) {
for (const auto& km : *n->m_obj) {
if (auto __r2 = w.enterSubRecord(nullptr)) {
if (auto __r2 = w.enterSubRecord()) {
w.setStyle(athena::io::YAMLNodeStyle::Flow);
km.write(w);
}
@ -1602,7 +1602,7 @@ static void WriteMimeYAML(athena::io::YAMLDocWriter& w, ProjectModel::KeymapNode
static void WriteMimeYAML(athena::io::YAMLDocWriter& w, ProjectModel::LayersNode* n) {
if (auto __v = w.enterSubVector("entries")) {
for (const auto& lm : *n->m_obj) {
if (auto __r2 = w.enterSubRecord(nullptr)) {
if (auto __r2 = w.enterSubRecord()) {
w.setStyle(athena::io::YAMLNodeStyle::Flow);
lm.write(w);
}
@ -1670,7 +1670,7 @@ EditorUndoCommand* ProjectModel::readMimeYAML<ProjectModel::KeymapNode>(athena::
size_t entryCount;
if (auto __v = r.enterSubVector("entries", entryCount)) {
for (size_t i = 0; i < entryCount; ++i) {
if (auto __r2 = r.enterSubRecord(nullptr)) {
if (auto __r2 = r.enterSubRecord()) {
(*dataNode)[i].read(r);
}
}
@ -1686,7 +1686,7 @@ EditorUndoCommand* ProjectModel::readMimeYAML<ProjectModel::LayersNode>(athena::
if (auto __v = r.enterSubVector("entries", entryCount)) {
dataNode->resize(entryCount);
for (size_t i = 0; i < entryCount; ++i) {
if (auto __r2 = r.enterSubRecord(nullptr)) {
if (auto __r2 = r.enterSubRecord()) {
(*dataNode)[i].read(r);
}
}
@ -1710,7 +1710,7 @@ template <class NT>
QMimeData* MakeMimeData(NT* n, const QString& mimeType) {
QMimeData* data = new QMimeData;
athena::io::VectorWriter vw;
athena::io::YAMLDocWriter w(nullptr);
athena::io::YAMLDocWriter w;
w.writeString("name", n->name().toStdString());
WriteMimeYAML(w, n);
w.finish(&vw);

View File

@ -207,7 +207,7 @@ CommandWidget::CommandWidget(QWidget* parent, amuse::SoundMacro::ICmd* cmd, amus
if (field.m_tp == amuse::SoundMacro::CmdIntrospection::Field::Type::SoundMacroId) {
collectionType = ProjectModel::INode::Type::SoundMacro;
} else if (field.m_tp == amuse::SoundMacro::CmdIntrospection::Field::Type::TableId) {
if (!field.m_name.compare("ADSR"))
if (field.m_name == "ADSR")
collectionType = ProjectModel::INode::Type::ADSR;
else
collectionType = ProjectModel::INode::Type::Curve;

View File

@ -162,26 +162,26 @@
<context>
<name>EffectCatalogue</name>
<message>
<location filename="../StudioSetupWidget.cpp" line="676"/>
<location filename="../StudioSetupWidget.cpp" line="680"/>
<location filename="../StudioSetupWidget.cpp" line="196"/>
<location filename="../StudioSetupWidget.cpp" line="203"/>
<source>Reverb Standard</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../StudioSetupWidget.cpp" line="676"/>
<location filename="../StudioSetupWidget.cpp" line="680"/>
<location filename="../StudioSetupWidget.cpp" line="197"/>
<location filename="../StudioSetupWidget.cpp" line="204"/>
<source>Reverb High</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../StudioSetupWidget.cpp" line="677"/>
<location filename="../StudioSetupWidget.cpp" line="681"/>
<location filename="../StudioSetupWidget.cpp" line="198"/>
<location filename="../StudioSetupWidget.cpp" line="205"/>
<source>Delay</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../StudioSetupWidget.cpp" line="677"/>
<location filename="../StudioSetupWidget.cpp" line="681"/>
<location filename="../StudioSetupWidget.cpp" line="199"/>
<location filename="../StudioSetupWidget.cpp" line="206"/>
<source>Chorus</source>
<translation type="unfinished"></translation>
</message>
@ -197,47 +197,47 @@
<context>
<name>KeymapControls</name>
<message>
<location filename="../KeymapEditor.cpp" line="300"/>
<location filename="../KeymapEditor.cpp" line="305"/>
<source>SoundMacro</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../KeymapEditor.cpp" line="306"/>
<location filename="../KeymapEditor.cpp" line="311"/>
<source>Transpose</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../KeymapEditor.cpp" line="311"/>
<location filename="../KeymapEditor.cpp" line="316"/>
<source>Offset resulting MIDI note</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../KeymapEditor.cpp" line="315"/>
<location filename="../KeymapEditor.cpp" line="320"/>
<source>Pan</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../KeymapEditor.cpp" line="320"/>
<location filename="../KeymapEditor.cpp" line="325"/>
<source>Set initial pan</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../KeymapEditor.cpp" line="324"/>
<location filename="../KeymapEditor.cpp" line="329"/>
<source>Surround</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../KeymapEditor.cpp" line="328"/>
<location filename="../KeymapEditor.cpp" line="333"/>
<source>Initially play through surround channels</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../KeymapEditor.cpp" line="332"/>
<location filename="../KeymapEditor.cpp" line="337"/>
<source>Prio Offset</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../KeymapEditor.cpp" line="337"/>
<location filename="../KeymapEditor.cpp" line="342"/>
<source>Offset resulting priority</source>
<translation type="unfinished"></translation>
</message>
@ -1021,7 +1021,7 @@
<context>
<name>ModulationSlider</name>
<message>
<location filename="../KeyboardWidget.cpp" line="187"/>
<location filename="../KeyboardWidget.cpp" line="214"/>
<source>Modulation: %1</source>
<translation type="unfinished"></translation>
</message>
@ -1184,17 +1184,17 @@
<context>
<name>PageObjectProxyModel</name>
<message>
<location filename="../ProjectModel.cpp" line="359"/>
<location filename="../ProjectModel.cpp" line="364"/>
<source>SoundMacros:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ProjectModel.cpp" line="361"/>
<location filename="../ProjectModel.cpp" line="366"/>
<source>Keymaps:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ProjectModel.cpp" line="363"/>
<location filename="../ProjectModel.cpp" line="368"/>
<source>Layers:</source>
<translation type="unfinished"></translation>
</message>
@ -1215,7 +1215,7 @@
<context>
<name>PaintButton</name>
<message>
<location filename="../KeymapEditor.cpp" line="60"/>
<location filename="../KeymapEditor.cpp" line="61"/>
<source>Activate brush to apply values to keys</source>
<translation type="unfinished"></translation>
</message>
@ -1223,7 +1223,7 @@
<context>
<name>PitchSlider</name>
<message>
<location filename="../KeyboardWidget.cpp" line="191"/>
<location filename="../KeyboardWidget.cpp" line="218"/>
<source>Pitch: %1</source>
<translation type="unfinished"></translation>
</message>
@ -1231,341 +1231,341 @@
<context>
<name>ProjectModel</name>
<message>
<location filename="../ProjectModel.cpp" line="700"/>
<location filename="../ProjectModel.cpp" line="710"/>
<location filename="../ProjectModel.cpp" line="719"/>
<location filename="../ProjectModel.cpp" line="729"/>
<location filename="../ProjectModel.cpp" line="737"/>
<location filename="../ProjectModel.cpp" line="775"/>
<location filename="../ProjectModel.cpp" line="707"/>
<location filename="../ProjectModel.cpp" line="717"/>
<location filename="../ProjectModel.cpp" line="726"/>
<location filename="../ProjectModel.cpp" line="736"/>
<location filename="../ProjectModel.cpp" line="744"/>
<location filename="../ProjectModel.cpp" line="782"/>
<source>Export Error</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ProjectModel.cpp" line="700"/>
<location filename="../ProjectModel.cpp" line="750"/>
<location filename="../ProjectModel.cpp" line="775"/>
<location filename="../ProjectModel.cpp" line="707"/>
<location filename="../ProjectModel.cpp" line="757"/>
<location filename="../ProjectModel.cpp" line="782"/>
<source>Unable to find group %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ProjectModel.cpp" line="710"/>
<location filename="../ProjectModel.cpp" line="717"/>
<source>Unable to export %1.proj</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ProjectModel.cpp" line="719"/>
<location filename="../ProjectModel.cpp" line="726"/>
<source>Unable to export %1.pool</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ProjectModel.cpp" line="729"/>
<location filename="../ProjectModel.cpp" line="736"/>
<source>Unable to export %1.sdir</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ProjectModel.cpp" line="737"/>
<location filename="../ProjectModel.cpp" line="744"/>
<source>Unable to export %1.samp</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ProjectModel.cpp" line="750"/>
<location filename="../ProjectModel.cpp" line="757"/>
<source>Import Error</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ProjectModel.cpp" line="760"/>
<location filename="../ProjectModel.cpp" line="767"/>
<source>Export Header Error</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ProjectModel.cpp" line="760"/>
<location filename="../ProjectModel.cpp" line="767"/>
<source>Unable to open %1 for reading</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ProjectModel.cpp" line="781"/>
<location filename="../ProjectModel.cpp" line="788"/>
<source>File Exists</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ProjectModel.cpp" line="781"/>
<location filename="../ProjectModel.cpp" line="788"/>
<source>%1 already exists. Overwrite?</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ProjectModel.cpp" line="830"/>
<location filename="../ProjectModel.cpp" line="837"/>
<source>Sound Macros</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ProjectModel.cpp" line="832"/>
<location filename="../ProjectModel.cpp" line="839"/>
<source>ADSRs</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ProjectModel.cpp" line="833"/>
<location filename="../ProjectModel.cpp" line="840"/>
<source>Curves</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ProjectModel.cpp" line="834"/>
<location filename="../ProjectModel.cpp" line="841"/>
<source>Keymaps</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ProjectModel.cpp" line="835"/>
<location filename="../ProjectModel.cpp" line="842"/>
<source>Layers</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ProjectModel.cpp" line="836"/>
<location filename="../ProjectModel.cpp" line="843"/>
<source>Samples</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ProjectModel.cpp" line="1088"/>
<location filename="../ProjectModel.cpp" line="1095"/>
<source>Naming Conflict</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ProjectModel.cpp" line="1088"/>
<location filename="../ProjectModel.cpp" line="1095"/>
<source>%1 already exists in this context</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ProjectModel.cpp" line="1092"/>
<location filename="../ProjectModel.cpp" line="1099"/>
<source>Rename %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ProjectModel.cpp" line="1211"/>
<location filename="../ProjectModel.cpp" line="1218"/>
<source>Subproject Conflict</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ProjectModel.cpp" line="1212"/>
<location filename="../ProjectModel.cpp" line="1219"/>
<source>The subproject %1 is already defined</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ProjectModel.cpp" line="1220"/>
<location filename="../ProjectModel.cpp" line="1783"/>
<location filename="../ProjectModel.cpp" line="1916"/>
<location filename="../ProjectModel.cpp" line="1227"/>
<location filename="../ProjectModel.cpp" line="1782"/>
<location filename="../ProjectModel.cpp" line="1915"/>
<source>Add Subproject %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ProjectModel.cpp" line="1302"/>
<location filename="../ProjectModel.cpp" line="1309"/>
<source>Sound Group Conflict</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ProjectModel.cpp" line="1302"/>
<location filename="../ProjectModel.cpp" line="1324"/>
<location filename="../ProjectModel.cpp" line="1309"/>
<location filename="../ProjectModel.cpp" line="1331"/>
<source>The group %1 is already defined</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ProjectModel.cpp" line="1307"/>
<location filename="../ProjectModel.cpp" line="1632"/>
<location filename="../ProjectModel.cpp" line="1923"/>
<location filename="../ProjectModel.cpp" line="1314"/>
<location filename="../ProjectModel.cpp" line="1631"/>
<location filename="../ProjectModel.cpp" line="1922"/>
<source>Add Sound Group %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ProjectModel.cpp" line="1324"/>
<location filename="../ProjectModel.cpp" line="1331"/>
<source>Song Group Conflict</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ProjectModel.cpp" line="1329"/>
<location filename="../ProjectModel.cpp" line="1624"/>
<location filename="../ProjectModel.cpp" line="1930"/>
<location filename="../ProjectModel.cpp" line="1336"/>
<location filename="../ProjectModel.cpp" line="1623"/>
<location filename="../ProjectModel.cpp" line="1929"/>
<source>Add Song Group %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ProjectModel.cpp" line="1433"/>
<location filename="../ProjectModel.cpp" line="1432"/>
<source>Sound Macro Conflict</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ProjectModel.cpp" line="1433"/>
<location filename="../ProjectModel.cpp" line="1432"/>
<source>The macro %1 is already defined</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ProjectModel.cpp" line="1444"/>
<location filename="../ProjectModel.cpp" line="1939"/>
<location filename="../ProjectModel.cpp" line="1443"/>
<location filename="../ProjectModel.cpp" line="1938"/>
<source>Add Sound Macro %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ProjectModel.cpp" line="1461"/>
<location filename="../ProjectModel.cpp" line="1460"/>
<source>ADSR Conflict</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ProjectModel.cpp" line="1461"/>
<location filename="../ProjectModel.cpp" line="1460"/>
<source>The ADSR %1 is already defined</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ProjectModel.cpp" line="1468"/>
<location filename="../ProjectModel.cpp" line="1657"/>
<location filename="../ProjectModel.cpp" line="1946"/>
<location filename="../ProjectModel.cpp" line="1467"/>
<location filename="../ProjectModel.cpp" line="1656"/>
<location filename="../ProjectModel.cpp" line="1945"/>
<source>Add ADSR %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ProjectModel.cpp" line="1485"/>
<location filename="../ProjectModel.cpp" line="1484"/>
<source>Curve Conflict</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ProjectModel.cpp" line="1485"/>
<location filename="../ProjectModel.cpp" line="1484"/>
<source>The Curve %1 is already defined</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ProjectModel.cpp" line="1492"/>
<location filename="../ProjectModel.cpp" line="1665"/>
<location filename="../ProjectModel.cpp" line="1953"/>
<location filename="../ProjectModel.cpp" line="1491"/>
<location filename="../ProjectModel.cpp" line="1664"/>
<location filename="../ProjectModel.cpp" line="1952"/>
<source>Add Curve %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ProjectModel.cpp" line="1509"/>
<location filename="../ProjectModel.cpp" line="1508"/>
<source>Keymap Conflict</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ProjectModel.cpp" line="1509"/>
<location filename="../ProjectModel.cpp" line="1508"/>
<source>The Keymap %1 is already defined</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ProjectModel.cpp" line="1515"/>
<location filename="../ProjectModel.cpp" line="1680"/>
<location filename="../ProjectModel.cpp" line="1960"/>
<location filename="../ProjectModel.cpp" line="1514"/>
<location filename="../ProjectModel.cpp" line="1679"/>
<location filename="../ProjectModel.cpp" line="1959"/>
<source>Add Keymap %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ProjectModel.cpp" line="1532"/>
<location filename="../ProjectModel.cpp" line="1531"/>
<source>Layers Conflict</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ProjectModel.cpp" line="1532"/>
<location filename="../ProjectModel.cpp" line="1531"/>
<source>Layers %1 is already defined</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ProjectModel.cpp" line="1538"/>
<location filename="../ProjectModel.cpp" line="1696"/>
<location filename="../ProjectModel.cpp" line="1967"/>
<location filename="../ProjectModel.cpp" line="1537"/>
<location filename="../ProjectModel.cpp" line="1695"/>
<location filename="../ProjectModel.cpp" line="1966"/>
<source>Add Layers %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ProjectModel.cpp" line="1544"/>
<location filename="../ProjectModel.cpp" line="1553"/>
<location filename="../ProjectModel.cpp" line="1543"/>
<location filename="../ProjectModel.cpp" line="1552"/>
<source>-copy</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ProjectModel.cpp" line="1642"/>
<location filename="../ProjectModel.cpp" line="1641"/>
<source>Add SoundMacro %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ProjectModel.cpp" line="1838"/>
<location filename="../ProjectModel.cpp" line="1837"/>
<source>Cut SongGroup %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ProjectModel.cpp" line="1841"/>
<location filename="../ProjectModel.cpp" line="1840"/>
<source>Cut SFXGroup %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ProjectModel.cpp" line="1844"/>
<location filename="../ProjectModel.cpp" line="1843"/>
<source>Cut SoundMacro %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ProjectModel.cpp" line="1847"/>
<location filename="../ProjectModel.cpp" line="1846"/>
<source>Cut ADSR %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ProjectModel.cpp" line="1850"/>
<location filename="../ProjectModel.cpp" line="1849"/>
<source>Cut Curve %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ProjectModel.cpp" line="1853"/>
<location filename="../ProjectModel.cpp" line="1852"/>
<source>Cut Keymap %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ProjectModel.cpp" line="1856"/>
<location filename="../ProjectModel.cpp" line="1855"/>
<source>Cut Layers %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ProjectModel.cpp" line="1988"/>
<location filename="../ProjectModel.cpp" line="1987"/>
<source>Delete Subproject</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ProjectModel.cpp" line="1989"/>
<location filename="../ProjectModel.cpp" line="1988"/>
<source>&lt;p&gt;The subproject %1 will be permanently deleted from the project. Sample files will be permanently removed from the file system.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;This action cannot be undone!&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;Continue?&lt;/p&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ProjectModel.cpp" line="2003"/>
<location filename="../ProjectModel.cpp" line="2002"/>
<source>Delete SongGroup %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ProjectModel.cpp" line="2006"/>
<location filename="../ProjectModel.cpp" line="2005"/>
<source>Delete SFXGroup %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ProjectModel.cpp" line="2009"/>
<location filename="../ProjectModel.cpp" line="2008"/>
<source>Delete SoundMacro %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ProjectModel.cpp" line="2012"/>
<location filename="../ProjectModel.cpp" line="2011"/>
<source>Delete ADSR %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ProjectModel.cpp" line="2015"/>
<location filename="../ProjectModel.cpp" line="2014"/>
<source>Delete Curve %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ProjectModel.cpp" line="2018"/>
<location filename="../ProjectModel.cpp" line="2017"/>
<source>Delete Keymap %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ProjectModel.cpp" line="2021"/>
<location filename="../ProjectModel.cpp" line="2020"/>
<source>Delete Layers %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ProjectModel.cpp" line="2025"/>
<location filename="../ProjectModel.cpp" line="2024"/>
<source>Delete Sample</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ProjectModel.cpp" line="2026"/>
<location filename="../ProjectModel.cpp" line="2025"/>
<source>&lt;p&gt;The sample %1 will be permanently deleted from the file system. &lt;p&gt;&lt;strong&gt;This action cannot be undone!&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;Continue?&lt;/p&gt;</source>
<translation type="unfinished"></translation>
</message>
@ -1997,17 +1997,17 @@
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../StatusBarWidget.cpp" line="23"/>
<location filename="../StatusBarWidget.cpp" line="22"/>
<source>Aux A send level for all voices</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../StatusBarWidget.cpp" line="30"/>
<location filename="../StatusBarWidget.cpp" line="29"/>
<source>Aux B send level for all voices</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../StatusBarWidget.cpp" line="37"/>
<location filename="../StatusBarWidget.cpp" line="36"/>
<source>Master volume level</source>
<translation type="unfinished"></translation>
</message>
@ -2015,17 +2015,17 @@
<context>
<name>StudioSetupWidget</name>
<message>
<location filename="../StudioSetupWidget.cpp" line="856"/>
<location filename="../StudioSetupWidget.cpp" line="927"/>
<source>Studio Setup</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../StudioSetupWidget.cpp" line="873"/>
<location filename="../StudioSetupWidget.cpp" line="944"/>
<source>Aux A</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../StudioSetupWidget.cpp" line="874"/>
<location filename="../StudioSetupWidget.cpp" line="945"/>
<source>Aux B</source>
<translation type="unfinished"></translation>
</message>
@ -2094,7 +2094,7 @@
<context>
<name>Uint32X8Button</name>
<message>
<location filename="../StudioSetupWidget.cpp" line="202"/>
<location filename="../StudioSetupWidget.cpp" line="265"/>
<source>Channels</source>
<translation type="unfinished"></translation>
</message>
@ -2102,42 +2102,42 @@
<context>
<name>Uint32X8Popup</name>
<message>
<location filename="../StudioSetupWidget.cpp" line="142"/>
<location filename="../StudioSetupWidget.cpp" line="189"/>
<source>Front Left</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../StudioSetupWidget.cpp" line="142"/>
<location filename="../StudioSetupWidget.cpp" line="189"/>
<source>Front Right</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../StudioSetupWidget.cpp" line="143"/>
<location filename="../StudioSetupWidget.cpp" line="190"/>
<source>Rear Left</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../StudioSetupWidget.cpp" line="143"/>
<location filename="../StudioSetupWidget.cpp" line="190"/>
<source>Rear Right</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../StudioSetupWidget.cpp" line="144"/>
<location filename="../StudioSetupWidget.cpp" line="191"/>
<source>Front Center</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../StudioSetupWidget.cpp" line="144"/>
<location filename="../StudioSetupWidget.cpp" line="191"/>
<source>LFE</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../StudioSetupWidget.cpp" line="145"/>
<location filename="../StudioSetupWidget.cpp" line="192"/>
<source>Side Left</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../StudioSetupWidget.cpp" line="145"/>
<location filename="../StudioSetupWidget.cpp" line="192"/>
<source>Side Right</source>
<translation type="unfinished"></translation>
</message>
@ -2145,7 +2145,7 @@
<context>
<name>VelocitySlider</name>
<message>
<location filename="../KeyboardWidget.cpp" line="183"/>
<location filename="../KeyboardWidget.cpp" line="210"/>
<source>Velocity: %1</source>
<translation type="unfinished"></translation>
</message>

View File

@ -330,7 +330,7 @@ VstInt32 VSTBackend::setChunk(void* data, VstInt32 byteSize, bool) {
for (auto& collection : m_filePresenter.m_audioGroupCollections) {
size_t fileIdx = 0;
for (auto& file : collection.second->m_groups) {
if (!file.second->m_path.compare(targetPath)) {
if (file.second->m_path == targetPath) {
m_editor.selectCollection(LPARAM(0x80000000 | (colIdx << 16) | fileIdx));
m_editor.selectGroup(groupIdx);
m_editor.selectPage(pageIdx);

View File

@ -149,7 +149,7 @@ protected:
virtual ~IObj() = default;
public:
void increment() noexcept { m_refCount.fetch_add(std::memory_order_relaxed); }
void increment() noexcept { m_refCount.fetch_add(1, std::memory_order_relaxed); }
void decrement() noexcept {
if (m_refCount.fetch_sub(1, std::memory_order_release) == 1) {
std::atomic_thread_fence(std::memory_order_acquire);

View File

@ -211,7 +211,7 @@ AudioGroupPool AudioGroupPool::CreateAudioGroupPool(SystemStringView groupPath)
if (!fi.hasError()) {
athena::io::YAMLDocReader r;
if (r.parse(&fi) && !r.readString("DNAType").compare("amuse::Pool")) {
if (r.parse(&fi) && r.readString("DNAType") == "amuse::Pool") {
if (auto __r = r.enterSubRecord("soundMacros")) {
for (const auto& sm : r.getCurNode()->m_mapChildren) {
ObjectId macroId = SoundMacroId::CurNameDB->generateId(NameDB::Type::SoundMacro);
@ -289,7 +289,7 @@ AudioGroupPool AudioGroupPool::CreateAudioGroupPool(SystemStringView groupPath)
auto& kmOut = ret.m_keymaps[KeymapId::CurNameDB->resolveIdFromName(k.first)];
kmOut = MakeObj<std::array<Keymap, 128>>();
for (size_t i = 0; i < mappingCount && i < 128; ++i)
if (auto __r2 = r.enterSubRecord(nullptr))
if (auto __r2 = r.enterSubRecord())
(*kmOut)[i].read(r);
}
}
@ -304,7 +304,7 @@ AudioGroupPool AudioGroupPool::CreateAudioGroupPool(SystemStringView groupPath)
layOut = MakeObj<std::vector<LayerMapping>>();
layOut->reserve(mappingCount);
for (size_t lm = 0; lm < mappingCount; ++lm) {
if (auto __r2 = r.enterSubRecord(nullptr)) {
if (auto __r2 = r.enterSubRecord()) {
layOut->emplace_back();
layOut->back().read(r);
}
@ -363,7 +363,7 @@ void SoundMacro::buildFromPrototype(const SoundMacro& other) {
void SoundMacro::toYAML(athena::io::YAMLDocWriter& w) const {
for (const auto& c : m_cmds) {
if (auto __r2 = w.enterSubRecord(nullptr)) {
if (auto __r2 = w.enterSubRecord()) {
w.setStyle(athena::io::YAMLNodeStyle::Flow);
w.writeString("cmdOp", SoundMacro::CmdOpToStr(c->Isa()));
c->write(w);
@ -374,7 +374,7 @@ void SoundMacro::toYAML(athena::io::YAMLDocWriter& w) const {
void SoundMacro::fromYAML(athena::io::YAMLDocReader& r, size_t cmdCount) {
m_cmds.reserve(cmdCount);
for (size_t c = 0; c < cmdCount; ++c)
if (auto __r2 = r.enterSubRecord(nullptr))
if (auto __r2 = r.enterSubRecord())
m_cmds.push_back(SoundMacro::CmdDo<MakeCmdOp, std::unique_ptr<SoundMacro::ICmd>>(r));
}
@ -948,7 +948,7 @@ std::vector<uint8_t> AudioGroupPool::toYAML() const {
if (!m_soundMacros.empty()) {
if (auto __r = w.enterSubRecord("soundMacros")) {
for (const auto& p : SortUnorderedMap(m_soundMacros)) {
if (auto __v = w.enterSubVector(SoundMacroId::CurNameDB->resolveNameFromId(p.first).data())) {
if (auto __v = w.enterSubVector(SoundMacroId::CurNameDB->resolveNameFromId(p.first))) {
p.second.get()->toYAML(w);
}
}
@ -958,7 +958,7 @@ std::vector<uint8_t> AudioGroupPool::toYAML() const {
if (!m_tables.empty()) {
if (auto __r = w.enterSubRecord("tables")) {
for (const auto& p : SortUnorderedMap(m_tables)) {
if (auto __v = w.enterSubRecord(TableId::CurNameDB->resolveNameFromId(p.first).data())) {
if (auto __v = w.enterSubRecord(TableId::CurNameDB->resolveNameFromId(p.first))) {
w.setStyle(athena::io::YAMLNodeStyle::Flow);
(*p.second.get())->write(w);
}
@ -969,9 +969,9 @@ std::vector<uint8_t> AudioGroupPool::toYAML() const {
if (!m_keymaps.empty()) {
if (auto __r = w.enterSubRecord("keymaps")) {
for (const auto& p : SortUnorderedMap(m_keymaps)) {
if (auto __v = w.enterSubVector(KeymapId::CurNameDB->resolveNameFromId(p.first).data())) {
if (auto __v = w.enterSubVector(KeymapId::CurNameDB->resolveNameFromId(p.first))) {
for (const auto& km : *p.second.get()) {
if (auto __r2 = w.enterSubRecord(nullptr)) {
if (auto __r2 = w.enterSubRecord()) {
w.setStyle(athena::io::YAMLNodeStyle::Flow);
km.write(w);
}
@ -984,9 +984,9 @@ std::vector<uint8_t> AudioGroupPool::toYAML() const {
if (!m_layers.empty()) {
if (auto __r = w.enterSubRecord("layers")) {
for (const auto& p : SortUnorderedMap(m_layers)) {
if (auto __v = w.enterSubVector(LayersId::CurNameDB->resolveNameFromId(p.first).data())) {
if (auto __v = w.enterSubVector(LayersId::CurNameDB->resolveNameFromId(p.first))) {
for (const auto& lm : *p.second.get()) {
if (auto __r2 = w.enterSubRecord(nullptr)) {
if (auto __r2 = w.enterSubRecord()) {
w.setStyle(athena::io::YAMLNodeStyle::Flow);
lm.write(w);
}
@ -1129,6 +1129,6 @@ void amuse::Curve::Enumerate<LittleDNA::WriteYaml>(athena::io::YAMLDocWriter& w)
w.enumerate("data", data);
}
const char* amuse::Curve::DNAType() { return "amuse::Curve"; }
std::string_view amuse::Curve::DNAType() { return "amuse::Curve"sv; }
} // namespace amuse

View File

@ -348,7 +348,7 @@ void SongGroupIndex::fromYAML(athena::io::YAMLDocReader& r) {
std::array<SongGroupIndex::MIDISetup, 16>& setup = m_midiSetups[songId];
for (size_t i = 0; i < 16 && i < chanCount; ++i)
if (auto __r2 = r.enterSubRecord(nullptr))
if (auto __r2 = r.enterSubRecord())
setup[i].read(r);
}
}
@ -375,7 +375,7 @@ AudioGroupProject AudioGroupProject::CreateAudioGroupProject(SystemStringView gr
if (!fi.hasError()) {
athena::io::YAMLDocReader r;
if (r.parse(&fi) && !r.readString("DNAType").compare("amuse::Project")) {
if (r.parse(&fi) && r.readString("DNAType") == "amuse::Project") {
if (auto __v = r.enterSubRecord("songGroups")) {
ret.m_songGroups.reserve(r.getCurNode()->m_mapChildren.size());
for (const auto& grp : r.getCurNode()->m_mapChildren) {
@ -609,7 +609,7 @@ void SongGroupIndex::toYAML(athena::io::YAMLDocWriter& w) const {
if (!m_normPages.empty()) {
if (auto __v2 = w.enterSubRecord("normPages")) {
for (const auto& pg : SortUnorderedMap(m_normPages)) {
if (auto __r2 = w.enterSubRecord(fmt::format(fmt("{}"), pg.first).c_str())) {
if (auto __r2 = w.enterSubRecord(fmt::format(fmt("{}"), pg.first))) {
w.setStyle(athena::io::YAMLNodeStyle::Flow);
pg.second.get().write(w);
}
@ -619,7 +619,7 @@ void SongGroupIndex::toYAML(athena::io::YAMLDocWriter& w) const {
if (!m_drumPages.empty()) {
if (auto __v2 = w.enterSubRecord("drumPages")) {
for (const auto& pg : SortUnorderedMap(m_drumPages)) {
if (auto __r2 = w.enterSubRecord(fmt::format(fmt("{}"), pg.first).c_str())) {
if (auto __r2 = w.enterSubRecord(fmt::format(fmt("{}"), pg.first))) {
w.setStyle(athena::io::YAMLNodeStyle::Flow);
pg.second.get().write(w);
}
@ -631,9 +631,9 @@ void SongGroupIndex::toYAML(athena::io::YAMLDocWriter& w) const {
for (const auto& song : SortUnorderedMap(m_midiSetups)) {
std::string songString = fmt::format(fmt("{}/0x{}"),
SongId::CurNameDB->resolveNameFromId(song.first), song.first);
if (auto __v3 = w.enterSubVector(songString.c_str()))
if (auto __v3 = w.enterSubVector(songString))
for (int i = 0; i < 16; ++i)
if (auto __r2 = w.enterSubRecord(nullptr)) {
if (auto __r2 = w.enterSubRecord()) {
w.setStyle(athena::io::YAMLNodeStyle::Flow);
song.second.get()[i].write(w);
}
@ -646,7 +646,7 @@ void SFXGroupIndex::toYAML(athena::io::YAMLDocWriter& w) const {
for (const auto& sfx : SortUnorderedMap(m_sfxEntries)) {
std::string sfxString = fmt::format(fmt("{}/0x{}"),
SFXId::CurNameDB->resolveNameFromId(sfx.first), sfx.first);
if (auto __r2 = w.enterSubRecord(sfxString.c_str())) {
if (auto __r2 = w.enterSubRecord(sfxString)) {
w.setStyle(athena::io::YAMLNodeStyle::Flow);
sfx.second.get().write(w);
}
@ -661,7 +661,7 @@ std::vector<uint8_t> AudioGroupProject::toYAML() const {
for (const auto& p : SortUnorderedMap(m_songGroups)) {
std::string groupString = fmt::format(fmt("{}/0x{}"),
GroupId::CurNameDB->resolveNameFromId(p.first), p.first);
if (auto __r = w.enterSubRecord(groupString.c_str())) {
if (auto __r = w.enterSubRecord(groupString)) {
p.second.get()->toYAML(w);
}
}
@ -673,7 +673,7 @@ std::vector<uint8_t> AudioGroupProject::toYAML() const {
for (const auto& p : SortUnorderedMap(m_sfxGroups)) {
std::string groupString = fmt::format(fmt("{}/0x{}"),
GroupId::CurNameDB->resolveNameFromId(p.first), p.first);
if (auto __r = w.enterSubRecord(groupString.c_str())) {
if (auto __r = w.enterSubRecord(groupString)) {
p.second.get()->toYAML(w);
}
}

View File

@ -99,7 +99,7 @@ bool Copy(const SystemChar* from, const SystemChar* to) {
} \
template <athena::Endian DNAE> \
void type##DNA<DNAE>::_read(athena::io::YAMLDocReader& r) { \
std::string name = r.readString(nullptr); \
std::string name = r.readString(); \
if (!type::CurNameDB) \
Log.report(logvisor::Fatal, fmt("Unable to resolve " typeName " name {}, no database present"), name); \
if (name.empty()) { \
@ -116,11 +116,11 @@ bool Copy(const SystemChar* from, const SystemChar* to) {
return; \
std::string_view name = type::CurNameDB->resolveNameFromId(id); \
if (!name.empty()) \
w.writeString(nullptr, name); \
w.writeString(name); \
} \
template <athena::Endian DNAE> \
const char* type##DNA<DNAE>::DNAType() { \
return "amuse::" #type "DNA"; \
std::string_view type##DNA<DNAE>::DNAType() { \
return "amuse::" #type "DNA"sv; \
} \
template struct type##DNA<athena::Big>; \
template struct type##DNA<athena::Little>;
@ -187,7 +187,7 @@ void PageObjectIdDNA<athena::Big>::Enumerate<BigDNA::WriteYaml>(athena::io::YAML
}
template <athena::Endian DNAE>
void PageObjectIdDNA<DNAE>::_read(athena::io::YAMLDocReader& r) {
std::string name = r.readString(nullptr);
std::string name = r.readString();
if (!KeymapId::CurNameDB || !LayersId::CurNameDB)
Log.report(logvisor::Fatal, fmt("Unable to resolve keymap or layers name {}, no database present"), name);
if (name.empty()) {
@ -217,20 +217,20 @@ void PageObjectIdDNA<DNAE>::_write(athena::io::YAMLDocWriter& w) {
if (id.id & 0x8000) {
std::string_view name = LayersId::CurNameDB->resolveNameFromId(id);
if (!name.empty())
w.writeString(nullptr, name);
w.writeString(name);
} else if (id.id & 0x4000) {
std::string_view name = KeymapId::CurNameDB->resolveNameFromId(id);
if (!name.empty())
w.writeString(nullptr, name);
w.writeString(name);
} else {
std::string_view name = SoundMacroId::CurNameDB->resolveNameFromId(id);
if (!name.empty())
w.writeString(nullptr, name);
w.writeString(name);
}
}
template <athena::Endian DNAE>
const char* PageObjectIdDNA<DNAE>::DNAType() {
return "amuse::PageObjectIdDNA";
std::string_view PageObjectIdDNA<DNAE>::DNAType() {
return "amuse::PageObjectIdDNA"sv;
}
template struct PageObjectIdDNA<athena::Big>;
template struct PageObjectIdDNA<athena::Little>;
@ -253,12 +253,12 @@ void SoundMacroStepDNA<athena::Little>::Enumerate<BigDNA::BinarySize>(size_t& sz
template <>
template <>
void SoundMacroStepDNA<athena::Little>::Enumerate<BigDNA::ReadYaml>(athena::io::YAMLDocReader& reader) {
step = reader.readUint16(nullptr);
step = reader.readUint16();
}
template <>
template <>
void SoundMacroStepDNA<athena::Little>::Enumerate<BigDNA::WriteYaml>(athena::io::YAMLDocWriter& writer) {
writer.writeUint16(nullptr, step);
writer.writeUint16(step);
}
template <>
template <>
@ -278,16 +278,16 @@ void SoundMacroStepDNA<athena::Big>::Enumerate<BigDNA::BinarySize>(size_t& sz) {
template <>
template <>
void SoundMacroStepDNA<athena::Big>::Enumerate<BigDNA::ReadYaml>(athena::io::YAMLDocReader& reader) {
step = reader.readUint16(nullptr);
step = reader.readUint16();
}
template <>
template <>
void SoundMacroStepDNA<athena::Big>::Enumerate<BigDNA::WriteYaml>(athena::io::YAMLDocWriter& writer) {
writer.writeUint16(nullptr, step);
writer.writeUint16(step);
}
template <athena::Endian DNAE>
const char* SoundMacroStepDNA<DNAE>::DNAType() {
return "amuse::SoundMacroStepDNA";
std::string_view SoundMacroStepDNA<DNAE>::DNAType() {
return "amuse::SoundMacroStepDNA"sv;
}
template struct SoundMacroStepDNA<athena::Big>;
template struct SoundMacroStepDNA<athena::Little>;
@ -411,14 +411,14 @@ void LittleUInt24::Enumerate<LittleDNA::BinarySize>(size_t& sz) {
template <>
void LittleUInt24::Enumerate<LittleDNA::ReadYaml>(athena::io::YAMLDocReader& reader) {
val = reader.readUint32(nullptr);
val = reader.readUint32();
}
template <>
void LittleUInt24::Enumerate<LittleDNA::WriteYaml>(athena::io::YAMLDocWriter& writer) {
writer.writeUint32(nullptr, val);
writer.writeUint32(val);
}
const char* LittleUInt24::DNAType() { return "amuse::LittleUInt24"; }
std::string_view LittleUInt24::DNAType() { return "amuse::LittleUInt24"sv; }
} // namespace amuse