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
d94a1738
There was an error fetching the commit references. Please try again later.
Commit
d94a1738
authored
6 years ago
by
Lioncash
Browse files
Options
Downloads
Patches
Plain Diff
kernel/vm_manager: Convert loop into std::any_of()
parent
c4e0c3d7
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/core/hle/kernel/vm_manager.cpp
+4
-4
4 additions, 4 deletions
src/core/hle/kernel/vm_manager.cpp
with
4 additions
and
4 deletions
src/core/hle/kernel/vm_manager.cpp
+
4
−
4
View file @
d94a1738
...
...
@@ -2,6 +2,7 @@
// Licensed under GPLv2 or any later version
// Refer to the license.txt file included.
#include
<algorithm>
#include
<iterator>
#include
<utility>
#include
"common/assert.h"
...
...
@@ -295,10 +296,9 @@ ResultVal<VMManager::VMAIter> VMManager::CarveVMARange(VAddr target, u64 size) {
VMAIter
begin_vma
=
StripIterConstness
(
FindVMA
(
target
));
const
VMAIter
i_end
=
vma_map
.
lower_bound
(
target_end
);
for
(
auto
i
=
begin_vma
;
i
!=
i_end
;
++
i
)
{
if
(
i
->
second
.
type
==
VMAType
::
Free
)
{
return
ERR_INVALID_ADDRESS_STATE
;
}
if
(
std
::
any_of
(
begin_vma
,
i_end
,
[](
const
auto
&
entry
)
{
return
entry
.
second
.
type
==
VMAType
::
Free
;
}))
{
return
ERR_INVALID_ADDRESS_STATE
;
}
if
(
target
!=
begin_vma
->
second
.
base
)
{
...
...
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