mirror of
https://github.com/akuker/RASCSI.git
synced 2025-07-23 07:24:13 +00:00
Cleanup (memory management, STL containers, type safety) based on SonarCloud report (#845)
* Removed static/global variable * No need for ControllerManager as a singleton * Updated factory handling * Replaced loops * Added const * Added translations, fixed TODO, simplified operation creation * Fixed SonarCloud warnings * Replaced void * by BYTE * * Added explicit mode_page_datetime struct * Unit test updates * Use enum classes * Upddated file size check * Use C++ output formatting * Removed unused code * Use array for garbage buffer * Fixed data returned by READ CAPACITY(10) * For mode pages: Replaced BYTE by std::byte * Use std::byte for INQUIRY * Use std::byte for REQUEST SENSE * Replaced C array by vector * Replaced C style array * Replaced BYTE by std::byte * Replaced DWORD * Use more byte arreys * Updated CTapDriver initialization/deletion * Made status uint32_t instead of DWORD * Replaced command byte array by vector * Updated error handling * Removed obsolete casts * Improved locality of code * rw_command has become obsolete * Dynamically allocate command byte buffer * Simplified receiving commands * Use references * Type safety update, dispatcher update * Removed macros, replaced BOOL/FALSE/TRUE
This commit is contained in:
@@ -14,6 +14,7 @@ TEST(ControllerManagerTest, ControllerManager)
|
||||
{
|
||||
const int ID = 4;
|
||||
const int LUN = 6;
|
||||
ControllerManager controller_manager;
|
||||
|
||||
auto device = device_factory.CreateDevice(UNDEFINED, "services", ID);
|
||||
device->SetId(ID);
|
||||
|
Reference in New Issue
Block a user