Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Suyu
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
many-archive
Suyu
Commits
655623eb
There was an error fetching the commit references. Please try again later.
Commit
655623eb
authored
8 years ago
by
Lioncash
Browse files
Options
Downloads
Patches
Plain Diff
file_util: const qualify IOFile's Tell and GetSize functions
parent
a4120ca6
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/common/file_util.cpp
+6
-6
6 additions, 6 deletions
src/common/file_util.cpp
src/common/file_util.h
+2
-2
2 additions, 2 deletions
src/common/file_util.h
with
8 additions
and
8 deletions
src/common/file_util.cpp
+
6
−
6
View file @
655623eb
...
@@ -930,12 +930,12 @@ bool IOFile::Close()
...
@@ -930,12 +930,12 @@ bool IOFile::Close()
return
m_good
;
return
m_good
;
}
}
u64
IOFile
::
GetSize
()
u64
IOFile
::
GetSize
()
const
{
{
if
(
IsOpen
())
if
(
IsOpen
())
return
FileUtil
::
GetSize
(
m_file
);
return
FileUtil
::
GetSize
(
m_file
);
else
return
0
;
return
0
;
}
}
bool
IOFile
::
Seek
(
s64
off
,
int
origin
)
bool
IOFile
::
Seek
(
s64
off
,
int
origin
)
...
@@ -946,12 +946,12 @@ bool IOFile::Seek(s64 off, int origin)
...
@@ -946,12 +946,12 @@ bool IOFile::Seek(s64 off, int origin)
return
m_good
;
return
m_good
;
}
}
u64
IOFile
::
Tell
()
u64
IOFile
::
Tell
()
const
{
{
if
(
IsOpen
())
if
(
IsOpen
())
return
ftello
(
m_file
);
return
ftello
(
m_file
);
else
return
-
1
;
return
-
1
;
}
}
bool
IOFile
::
Flush
()
bool
IOFile
::
Flush
()
...
...
This diff is collapsed.
Click to expand it.
src/common/file_util.h
+
2
−
2
View file @
655623eb
...
@@ -247,8 +247,8 @@ public:
...
@@ -247,8 +247,8 @@ public:
explicit
operator
bool
()
const
{
return
IsGood
();
}
explicit
operator
bool
()
const
{
return
IsGood
();
}
bool
Seek
(
s64
off
,
int
origin
);
bool
Seek
(
s64
off
,
int
origin
);
u64
Tell
();
u64
Tell
()
const
;
u64
GetSize
();
u64
GetSize
()
const
;
bool
Resize
(
u64
size
);
bool
Resize
(
u64
size
);
bool
Flush
();
bool
Flush
();
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment