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
31f7fede
Commit
31f7fede
authored
Jul 23, 2021
by
Max Kellermann
Committed by
Max Kellermann
Aug 28, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
java/GlobalRef: remove method Set(), always require initialization
parent
917fe549
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
21 deletions
+0
-21
AudioManager.hxx
src/android/AudioManager.hxx
+0
-4
Ref.hxx
src/java/Ref.hxx
+0
-17
No files found.
src/android/AudioManager.hxx
View file @
31f7fede
...
...
@@ -30,10 +30,6 @@ class AudioManager : public Java::GlobalObject {
public
:
AudioManager
(
JNIEnv
*
env
,
jobject
obj
)
noexcept
;
AudioManager
(
std
::
nullptr_t
)
noexcept
{
maxVolume
=
0
;
}
~
AudioManager
()
noexcept
{}
int
GetMaxVolume
()
{
return
maxVolume
;
}
int
GetVolume
(
JNIEnv
*
env
);
void
SetVolume
(
JNIEnv
*
env
,
int
);
...
...
src/java/Ref.hxx
View file @
31f7fede
...
...
@@ -110,12 +110,6 @@ class GlobalRef {
T
value
;
public
:
/**
* Constructs an uninitialized object. The method
* set() must be called before it is destructed.
*/
GlobalRef
()
=
default
;
GlobalRef
(
JNIEnv
*
env
,
T
_value
)
noexcept
:
value
(
_value
)
{
...
...
@@ -135,17 +129,6 @@ public:
GlobalRef
(
const
GlobalRef
&
other
)
=
delete
;
GlobalRef
&
operator
=
(
const
GlobalRef
&
other
)
=
delete
;
/**
* Sets the object, ignoring the previous value. This
* is only allowed once after the default constructor
* was used.
*/
void
Set
(
JNIEnv
*
env
,
T
_value
)
noexcept
{
assert
(
_value
!=
nullptr
);
value
=
(
T
)
env
->
NewGlobalRef
(
_value
);
}
T
Get
()
const
noexcept
{
return
value
;
}
...
...
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