Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
4265e71d
Commit
4265e71d
authored
Aug 19, 2014
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
InputStream: add constant UNKNOWN_SIZE
parent
f66a72c6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
4 deletions
+6
-4
InputStream.hxx
src/input/InputStream.hxx
+5
-3
ProxyInputStream.cxx
src/input/ProxyInputStream.cxx
+1
-1
No files found.
src/input/InputStream.hxx
View file @
4265e71d
...
...
@@ -76,8 +76,10 @@ protected:
*/
bool
seekable
;
static
constexpr
offset_type
UNKNOWN_SIZE
=
-
1
;
/**
* the size of the resource, or
-1
if unknown
* the size of the resource, or
#UNKNOWN_SIZE
if unknown
*/
offset_type
size
;
...
...
@@ -97,7 +99,7 @@ public:
:
uri
(
_uri
),
mutex
(
_mutex
),
cond
(
_cond
),
ready
(
false
),
seekable
(
false
),
size
(
-
1
),
offset
(
0
)
{
size
(
UNKNOWN_SIZE
),
offset
(
0
)
{
assert
(
_uri
!=
nullptr
);
}
...
...
@@ -221,7 +223,7 @@ public:
bool
KnownSize
()
const
{
assert
(
ready
);
return
size
>=
0
;
return
size
!=
UNKNOWN_SIZE
;
}
gcc_pure
...
...
src/input/ProxyInputStream.cxx
View file @
4265e71d
...
...
@@ -42,7 +42,7 @@ ProxyInputStream::CopyAttributes()
size
=
input
.
KnownSize
()
?
input
.
GetSize
()
:
-
1
;
:
UNKNOWN_SIZE
;
seekable
=
input
.
IsSeekable
();
SetReady
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment