From 4049f3f323f09c7b78fc1054853a5f2822c76476 Mon Sep 17 00:00:00 2001 From: Jean Pierre Cimalando Date: Thu, 21 May 2020 14:03:30 +0200 Subject: [PATCH] Remove useless things --- src/external/tunings/include/Tunings.h | 10 +--------- src/external/tunings/src/Tunings.cpp | 8 -------- 2 files changed, 1 insertion(+), 17 deletions(-) diff --git a/src/external/tunings/include/Tunings.h b/src/external/tunings/include/Tunings.h index 3f823dad..062f5519 100644 --- a/src/external/tunings/include/Tunings.h +++ b/src/external/tunings/include/Tunings.h @@ -72,14 +72,11 @@ namespace Tunings * * In most normal use, you will simply pass around instances of this class * to a Tunings::Tuning instance, but in some cases you may want to create - * or inspect this class yourself. Especially if you are displaying this - * class to your end users, you may want to use the rawText or count methods. + * or inspect this class yourself. */ struct Scale { - //std::string name = "empty scale"; // The name in the SCL file. Informational only std::string description; // The description in the SCL file. Informational only - std::string rawText; // The raw text of the SCL file used to create this Scale int count = 0; // The number of tones. std::vector tones; // The tones }; @@ -90,8 +87,6 @@ namespace Tunings * pick a fixed note in the midi keyboard when retuning. The KBM file can also * remap individual keys to individual points in a scale, which kere is done with the * keys vector. - * - * Just as with Scale, the rawText member contains the text of the KBM file used. */ struct KeyboardMapping @@ -103,9 +98,6 @@ namespace Tunings double tuningFrequency = MIDI_0_FREQ * 32.0, tuningPitch = 32.0; // pitch = frequency / MIDI_0_FREQ int octaveDegrees = 12; std::vector keys; // rather than an 'x' we use a '-1' for skipped keys - - std::string rawText; - //std::string name; }; /** diff --git a/src/external/tunings/src/Tunings.cpp b/src/external/tunings/src/Tunings.cpp index 5411a1b6..bc3c9d06 100644 --- a/src/external/tunings/src/Tunings.cpp +++ b/src/external/tunings/src/Tunings.cpp @@ -78,11 +78,9 @@ namespace Tunings int state = read_header; Scale res; - std::ostringstream rawOSS; int lineno = 0; while (std::getline(inf, line)) { - rawOSS << line << "\n"; lineno ++; if (line.empty() || line[0] == '!') @@ -121,7 +119,6 @@ namespace Tunings throw TuningError(s); } - res.rawText = rawOSS.str(); return res; } @@ -136,7 +133,6 @@ namespace Tunings } auto res = readSCLStream(inf); - //res.name = std::move(fname); return res; } @@ -144,7 +140,6 @@ namespace Tunings { std::istringstream iss(d); auto res = readSCLStream(iss); - //res.name = "Scale from Patch"; return res; } @@ -200,7 +195,6 @@ namespace Tunings std::string line; KeyboardMapping res; - std::ostringstream rawOSS; res.keys.clear(); enum parsePosition { @@ -219,7 +213,6 @@ namespace Tunings int lineno = 0; while (std::getline(inf, line)) { - rawOSS << line << "\n"; lineno ++; if (line.empty() || line[0] == '!') { @@ -298,7 +291,6 @@ namespace Tunings + std::to_string( res.count ) + " and we parsed " + std::to_string( res.keys.size() ) + " keys." ); } - res.rawText = rawOSS.str(); return res; }