-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed several issues reported by PVS Studio static analyzer
- Loading branch information
Showing
42 changed files
with
287 additions
and
380 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/* | ||
* Copyright (C) 2021 Linux Studio Plugins Project <https://lsp-plug.in/> | ||
* (C) 2021 Vladimir Sadovnikov <[email protected]> | ||
* Copyright (C) 2023 Linux Studio Plugins Project <https://lsp-plug.in/> | ||
* (C) 2023 Vladimir Sadovnikov <[email protected]> | ||
* | ||
* This file is part of lsp-dsp-units | ||
* Created on: 10 авг. 2021 г. | ||
|
@@ -90,10 +90,10 @@ namespace lsp | |
private: | ||
RayTrace3D *trace; | ||
stats_t stats; | ||
ssize_t heavy_state; | ||
lltl::parray<rt::context_t> tasks; | ||
lltl::parray<rt_binding_t> bindings; // Bindings | ||
lltl::parray<rt_object_t> objects; | ||
ssize_t heavy_state; | ||
|
||
protected: | ||
status_t main_loop(); | ||
|
@@ -173,16 +173,14 @@ namespace lsp | |
status_t do_process(size_t threads, float initial); | ||
|
||
public: | ||
/** Default constructor | ||
* | ||
*/ | ||
explicit RayTrace3D(); | ||
|
||
/** Destructor | ||
* | ||
*/ | ||
RayTrace3D(const RayTrace3D &) = delete; | ||
RayTrace3D(RayTrace3D &&) = delete; | ||
~RayTrace3D(); | ||
|
||
RayTrace3D & operator = (const RayTrace3D &) = delete; | ||
RayTrace3D & operator = (RayTrace3D &&) = delete; | ||
|
||
public: | ||
/** | ||
* Initialize raytrace object | ||
|
@@ -320,8 +318,8 @@ namespace lsp | |
status_t process(size_t threads, float initial); | ||
}; | ||
|
||
} // namespace dspu | ||
} // namespace lsp | ||
} /* namespace dspu */ | ||
} /* namespace lsp */ | ||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/* | ||
* Copyright (C) 2021 Linux Studio Plugins Project <https://lsp-plug.in/> | ||
* (C) 2021 Stefano Tronci <[email protected]> | ||
* Copyright (C) 2023 Linux Studio Plugins Project <https://lsp-plug.in/> | ||
* (C) 2023 Stefano Tronci <[email protected]> | ||
* | ||
* This file is part of lsp-dsp-units | ||
* Created on: 15 Sept 2021 | ||
|
@@ -66,10 +66,6 @@ namespace lsp | |
|
||
class LSP_DSP_UNITS_PUBLIC SpectralTilt | ||
{ | ||
private: | ||
SpectralTilt & operator = (const SpectralTilt &); | ||
SpectralTilt(const SpectralTilt &); | ||
|
||
protected: | ||
|
||
typedef struct bilinear_spec_t | ||
|
@@ -101,8 +97,13 @@ namespace lsp | |
|
||
public: | ||
explicit SpectralTilt(); | ||
SpectralTilt(const SpectralTilt &) = delete; | ||
SpectralTilt(SpectralTilt &&) = delete; | ||
~SpectralTilt(); | ||
|
||
SpectralTilt & operator = (const SpectralTilt &) = delete; | ||
SpectralTilt & operator = (SpectralTilt &&) = delete; | ||
|
||
void construct(); | ||
void destroy(); | ||
|
||
|
@@ -209,7 +210,7 @@ namespace lsp | |
void dump(IStateDumper *v) const; | ||
}; | ||
|
||
} | ||
} | ||
} /* namespace dspu */ | ||
} /* namespace lsp */ | ||
|
||
#endif /* LSP_PLUG_IN_DSP_UNITS_FILTERS_SPECTRALTILT_H_ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/* | ||
* Copyright (C) 2021 Linux Studio Plugins Project <https://lsp-plug.in/> | ||
* (C) 2021 Stefano Tronci <[email protected]> | ||
* Copyright (C) 2023 Linux Studio Plugins Project <https://lsp-plug.in/> | ||
* (C) 2023 Stefano Tronci <[email protected]> | ||
* | ||
* This file is part of lsp-dsp-units | ||
* Created on: 13 Jun 2021 | ||
|
@@ -34,8 +34,7 @@ namespace lsp | |
LCG_UNIFORM, // Uniform over [-1, 1), X fAmplitude + fOffset | ||
LCG_EXPONENTIAL, // Double sided exponential over [-1, 1], X fAmplitude + fOffset | ||
LCG_TRIANGULAR, // Triangular over [-1, 1], X fAmplitude + fOffset | ||
LCG_GAUSSIAN, // Gaussian of mean 0 and standard deviation 1, X fAmplitude + fOffset | ||
LCG_MAX | ||
LCG_GAUSSIAN // Gaussian of mean 0 and standard deviation 1, X fAmplitude + fOffset | ||
}; | ||
|
||
/** LCG stands for Linear Congruential Generator. | ||
|
@@ -47,10 +46,6 @@ namespace lsp | |
*/ | ||
class LSP_DSP_UNITS_PUBLIC LCG | ||
{ | ||
private: | ||
LCG & operator = (const LCG &); | ||
LCG(const LCG &); | ||
|
||
private: | ||
lcg_dist_t enDistribution; | ||
|
||
|
@@ -61,8 +56,13 @@ namespace lsp | |
|
||
public: | ||
explicit LCG(); | ||
LCG(const LCG &) = delete; | ||
LCG(LCG &&) = delete; | ||
~LCG(); | ||
|
||
LCG & operator = (const LCG &) = delete; | ||
LCG & operator = (LCG &) = delete; | ||
|
||
void construct(); | ||
void destroy(); | ||
|
||
|
@@ -84,9 +84,6 @@ namespace lsp | |
*/ | ||
inline void set_distribution(lcg_dist_t dist) | ||
{ | ||
if ((dist < LCG_UNIFORM) || (dist >= LCG_MAX)) | ||
return; | ||
|
||
enDistribution = dist; | ||
} | ||
|
||
|
@@ -150,7 +147,7 @@ namespace lsp | |
*/ | ||
void dump(IStateDumper *v) const; | ||
}; | ||
} | ||
} | ||
} /* namespace dspu */ | ||
} /* namespace lsp */ | ||
|
||
#endif /* LSP_PLUG_IN_DSP_UNITS_NOISE_LCG_H_ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/* | ||
* Copyright (C) 2021 Linux Studio Plugins Project <https://lsp-plug.in/> | ||
* (C) 2021 Stefano Tronci <[email protected]> | ||
* Copyright (C) 2023 Linux Studio Plugins Project <https://lsp-plug.in/> | ||
* (C) 2023 Stefano Tronci <[email protected]> | ||
* | ||
* This file is part of lsp-dsp-units | ||
* Created on: 27 Jun 2021 | ||
|
@@ -33,17 +33,15 @@ namespace lsp | |
enum vn_core_t | ||
{ | ||
VN_CORE_MLS, // Only compatible with OVN, OVNA and ARN (not crushed) | ||
VN_CORE_LCG, | ||
VN_CORE_MAX | ||
VN_CORE_LCG | ||
}; | ||
|
||
enum vn_velvet_type_t | ||
{ | ||
VN_VELVET_OVN, | ||
VN_VELVET_OVNA, | ||
VN_VELVET_ARN, | ||
VN_VELVET_TRN, | ||
VN_VELVET_MAX | ||
VN_VELVET_TRN | ||
}; | ||
|
||
/** As in GENERALIZATIONS OF VELVET NOISE AND THEIR USE IN 1-BIT MUSIC by Kurt James Werner | ||
|
@@ -199,7 +197,7 @@ namespace lsp | |
*/ | ||
void dump(IStateDumper *v) const; | ||
}; | ||
} | ||
} | ||
} /* namespace dspu */ | ||
} /* namespace lsp */ | ||
|
||
#endif /* LSP_PLUG_IN_DSP_UNITS_NOISE_VELVET_H_ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/* | ||
* Copyright (C) 2022 Linux Studio Plugins Project <https://lsp-plug.in/> | ||
* (C) 2022 Vladimir Sadovnikov <[email protected]> | ||
* Copyright (C) 2023 Linux Studio Plugins Project <https://lsp-plug.in/> | ||
* (C) 2023 Vladimir Sadovnikov <[email protected]> | ||
* | ||
* This file is part of lsp-dsp-units | ||
* Created on: 18 нояб. 2022 г. | ||
|
@@ -52,12 +52,12 @@ namespace lsp | |
Playback(Playback &&src); | ||
~Playback(); | ||
|
||
Playback & operator = (const Playback & src); | ||
Playback & operator = (Playback && src); | ||
|
||
void construct(); | ||
void destroy(); | ||
|
||
public: | ||
Playback & operator = (const Playback & src); | ||
|
||
public: | ||
/** | ||
* Check that playback is still valid. Should be called before reading playback parameters | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/* | ||
* Copyright (C) 2020 Linux Studio Plugins Project <https://lsp-plug.in/> | ||
* (C) 2020 Vladimir Sadovnikov <[email protected]> | ||
* Copyright (C) 2023 Linux Studio Plugins Project <https://lsp-plug.in/> | ||
* (C) 2023 Vladimir Sadovnikov <[email protected]> | ||
* | ||
* This file is part of lsp-dsp-units | ||
* Created on: 13 марта 2016 г. | ||
|
@@ -35,10 +35,6 @@ namespace lsp | |
{ | ||
class LSP_DSP_UNITS_PUBLIC SamplePlayer | ||
{ | ||
private: | ||
SamplePlayer & operator = (const SamplePlayer &); | ||
SamplePlayer(const SamplePlayer &); | ||
|
||
protected: | ||
typedef struct play_item_t: public playback::playback_t | ||
{ | ||
|
@@ -81,8 +77,13 @@ namespace lsp | |
|
||
public: | ||
explicit SamplePlayer(); | ||
SamplePlayer(const SamplePlayer &) = delete; | ||
SamplePlayer(SamplePlayer &&) = delete; | ||
~SamplePlayer(); | ||
|
||
SamplePlayer & operator = (const SamplePlayer &) = delete; | ||
SamplePlayer & operator = (SamplePlayer &&) = delete; | ||
|
||
/** | ||
* Construct sample player | ||
*/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/* | ||
* Copyright (C) 2020 Linux Studio Plugins Project <https://lsp-plug.in/> | ||
* (C) 2020 Vladimir Sadovnikov <[email protected]> | ||
* Copyright (C) 2023 Linux Studio Plugins Project <https://lsp-plug.in/> | ||
* (C) 2023 Vladimir Sadovnikov <[email protected]> | ||
* | ||
* This file is part of lsp-dsp-units | ||
* Created on: 29 янв. 2016 г. | ||
|
@@ -34,10 +34,6 @@ namespace lsp | |
{ | ||
class LSP_DSP_UNITS_PUBLIC Convolver | ||
{ | ||
private: | ||
Convolver & operator = (const Convolver &); | ||
Convolver(const Convolver &); | ||
|
||
private: | ||
float *vDataBuffer; // Buffer for storing convolution tail data | ||
float *vFrame; // Pointer to the beginning of the input data frame | ||
|
@@ -62,8 +58,13 @@ namespace lsp | |
|
||
public: | ||
explicit Convolver(); | ||
Convolver(const Convolver &) = delete; | ||
Convolver(Convolver &&) = delete; | ||
~Convolver(); | ||
|
||
Convolver & operator = (const Convolver &) = delete; | ||
Convolver & operator = (Convolver &&) = delete; | ||
|
||
/** Construct the convolver | ||
* | ||
*/ | ||
|
@@ -111,7 +112,8 @@ namespace lsp | |
*/ | ||
void dump(IStateDumper *v) const; | ||
}; | ||
} | ||
|
||
} /* namespace dspu */ | ||
} /* namespace lsp */ | ||
|
||
#endif /* LSP_PLUG_IN_DSP_UNITS_UTIL_CONVOLVER_H_ */ |
Oops, something went wrong.