We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 77b3773 commit 41f0831Copy full SHA for 41f0831
src/AudioBasic/Collections/Slice.h
@@ -23,7 +23,7 @@ class Slice {
23
/// Returns the data
24
T* data() { return start; }
25
26
- /// Returns the (result) data size in bytes
+ /// Returns the (result) data size is number of entries
27
size_t size() { return len; }
28
29
/// Returns the number of slices of the indicated size
@@ -32,7 +32,8 @@ class Slice {
32
return len % sliceSize == 0 ? result : result+1;
33
}
34
35
- operator bool() { return len > 0; }
+ /// Returns true if we contain any valid data
36
+ operator bool() { return len > 0 && start!?nullptr; }
37
38
/// Returns the slice at the indicated index for the indicated slize size;
39
Slice slice(int sliceSize, int idx) {
0 commit comments