Skip to content

Commit

Permalink
Remove deprecated stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
Guillaume Piolat committed Dec 11, 2024
1 parent 3d52382 commit 2adc96c
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 43 deletions.
2 changes: 1 addition & 1 deletion canvas/dplug/canvas/package.d
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ alias ImageDest = ImageRef!RGBA;

/// dplug:canvas used to have CSS color parsing, now it's in
/// `colors` package
deprecated("Use parseCSSColor and package colors instead")
deprecated("Use parseCSSColor and package colors instead. This will be removed in Dplug v16")
bool parseHTMLColor(const(char)[] htmlColorString,
out RGBA outColor,
out string error) pure nothrow @nogc @safe
Expand Down
12 changes: 6 additions & 6 deletions core/dplug/core/math.d
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ bool isPowerOfTwo(int i) pure @safe
FUTURE: Why is that in dplug:core?
*/
deprecated("Will be removed in Dplug v15")
deprecated("Will be removed in Dplug v16")
int iFloorLog2(int i) pure @safe
{
assert(i >= 1);
Expand All @@ -472,7 +472,7 @@ int iFloorLog2(int i) pure @safe

/// Fletcher and Munson equal-loudness curve
/// Reference: Xavier Serra thesis (1989).
deprecated("equalLoudnessCurve will be removed in Dplug v15")
deprecated("equalLoudnessCurve will be removed in Dplug v16")
T equalLoudnessCurve(T)(T frequency) pure
{
T x = cast(T)0.05 + 4000 / frequency;
Expand Down Expand Up @@ -531,27 +531,27 @@ float convertNormalizedFrequencyToFrequency(float freqCyclesPerSample,
}

/// Quick and dirty sawtooth for testing purposes.
deprecated("rawSawtooth will be removed in Dplug v15")
deprecated("rawSawtooth will be removed in Dplug v16")
T rawSawtooth(T)(T x)
{
return normalizePhase(x) / (cast(T)PI);
}

/// Quick and dirty triangle for testing purposes.
deprecated("rawTriangle will be removed in Dplug v15")
deprecated("rawTriangle will be removed in Dplug v16")
T rawTriangle(T)(T x)
{
return 1 - normalizePhase(x) / cast(T)PI_2;
}

/// Quick and dirty square for testing purposes.
deprecated("rawSquare will be removed in Dplug v15")
deprecated("rawSquare will be removed in Dplug v16")
T rawSquare(T)(T x)
{
return normalizePhase(x) > 0 ? 1 : -1;
}

deprecated("computeRMS will be removed in Dplug v15")
deprecated("computeRMS will be removed in Dplug v16")
T computeRMS(T)(T[] samples) pure
{
double sum = 0;
Expand Down
8 changes: 1 addition & 7 deletions flp/dplug/flp/types.d
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,10 @@ struct TTimeSigInfo
int PPQ;
}

deprecated alias HINSTANCE = void*;
deprecated alias HMENU = void*;
deprecated alias DWORD = uint;
deprecated alias HWND = void*;
alias HANDLE = void*;
deprecated enum MAX_PATH = 256;
alias ULONG = uint;
alias HRESULT = c_long;
deprecated alias ULARGE_INTEGER = ulong;
deprecated alias LARGE_INTEGER = long;


// plugin flags
enum int FPF_Generator = 1; // plugin is a generator (not effect)
Expand Down
25 changes: 0 additions & 25 deletions graphics/dplug/graphics/draw.d
Original file line number Diff line number Diff line change
Expand Up @@ -163,31 +163,6 @@ void fillRect(bool CHECKED=true, V, COLOR)(auto ref V v, int x1, int y1, int x2,
v.fillRect!CHECKED(x1+1, y1+1, x2-1, y2-1, b);
}

/// Unchecked! Make sure area is bounded.
deprecated void uncheckedFloodFill(V, COLOR)(auto ref V v, int x, int y, COLOR c)
if (isDirectView!V && is(COLOR : ViewColor!V))
{
v.floodFillPtr(&v[x, y], c, v[x, y]);
}

deprecated private void floodFillPtr(V, COLOR)(auto ref V v, COLOR* pp, COLOR c, COLOR f)
if (isDirectView!V && is(COLOR : ViewColor!V))
{
COLOR* p0 = pp; while (*p0==f) p0--; p0++;
COLOR* p1 = pp; while (*p1==f) p1++; p1--;
auto stride = v.scanline(1).ptr-v.scanline(0).ptr;
for (auto p=p0; p<=p1; p++)
*p = c;
p0 -= stride; p1 -= stride;
for (auto p=p0; p<=p1; p++)
if (*p == f)
v.floodFillPtr(p, c, f);
p0 += stride*2; p1 += stride*2;
for (auto p=p0; p<=p1; p++)
if (*p == f)
v.floodFillPtr(p, c, f);
}

void fillCircle(V, COLOR)(auto ref V v, int x, int y, int r, COLOR c)
if (isWritableView!V && is(COLOR : ViewColor!V))
{
Expand Down
2 changes: 1 addition & 1 deletion gui/dplug/gui/element.d
Original file line number Diff line number Diff line change
Expand Up @@ -833,7 +833,7 @@ nothrow:
return _zOrder;
}

// TODO: how to deprecate that? Wren will stumble upon every deprecated fields unfortunately.
// TODO: how to depreciate that? Wren will stumble upon every deprecated fields unfortunately.
alias setZOrder = zOrder;

final void zOrder(int zOrder)
Expand Down
2 changes: 0 additions & 2 deletions host/dplug/host/host.d
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,6 @@ nothrow @nogc:

/// Get tail size in seconds. Precise semantics TBD.
double getTailSizeInSeconds();

deprecated("Use destroyPluginHost() instead") void close();
}


2 changes: 1 addition & 1 deletion tools/dplug-build/source/main.d
Original file line number Diff line number Diff line change
Expand Up @@ -909,7 +909,7 @@ int main(string[] args)
else
{
// Simply copy the file, single file .vst3
// which is deprecated normally and on the way out
// which is depreciated normally and on the way out
string appendBitnessVST3(string prettyName, string originalPath)
{
if (arch == Arch.x86_64)
Expand Down

0 comments on commit 2adc96c

Please sign in to comment.