Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
M
Mirai
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
Mirai
Commits
b265533b
Commit
b265533b
authored
Feb 10, 2020
by
Him188
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix warnings
parent
2d9be254
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
24 deletions
+2
-24
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/message/data/MessageChain.kt
...nMain/kotlin/net.mamoe.mirai/message/data/MessageChain.kt
+2
-24
No files found.
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/message/data/MessageChain.kt
View file @
b265533b
...
@@ -62,7 +62,7 @@ interface MessageChain : Message, MutableList<Message> {
...
@@ -62,7 +62,7 @@ interface MessageChain : Message, MutableList<Message> {
/**
/**
* 提供一个类型的值. 若不存在则会抛出异常 [NoSuchElementException]
* 提供一个类型的值. 若不存在则会抛出异常 [NoSuchElementException]
*/
*/
inline
operator
fun
<
reified
T
:
Message
>
MessageChain
.
getValue
(
thisRef
:
Any
?,
property
:
KProperty
<
*
>):
T
=
this
.
first
<
T
>()
as
T
inline
operator
fun
<
reified
T
:
Message
>
MessageChain
.
getValue
(
thisRef
:
Any
?,
property
:
KProperty
<
*
>):
T
=
this
.
first
()
/**
/**
* 构造无初始元素的可修改的 [MessageChain]. 初始大小将会被设定为 8
* 构造无初始元素的可修改的 [MessageChain]. 初始大小将会被设定为 8
...
@@ -430,26 +430,4 @@ internal inline class SingleMessageChainImpl(
...
@@ -430,26 +430,4 @@ internal inline class SingleMessageChainImpl(
override
operator
fun
contains
(
element
:
Message
):
Boolean
=
element
==
delegate
override
operator
fun
contains
(
element
:
Message
):
Boolean
=
element
==
delegate
override
val
size
:
Int
get
()
=
1
override
val
size
:
Int
get
()
=
1
// endregion
// endregion
}
}
\ No newline at end of file
@Suppress
(
"FunctionName"
)
private
fun
<
E
>
EmptyMutableIterator
():
MutableIterator
<
E
>
=
object
:
MutableIterator
<
E
>
{
override
fun
hasNext
():
Boolean
=
false
override
fun
next
():
E
=
throw
NoSuchElementException
()
override
fun
remove
()
=
throw
NoSuchElementException
()
}
@Suppress
(
"FunctionName"
)
private
fun
<
E
>
EmptyMutableListIterator
():
MutableListIterator
<
E
>
=
object
:
MutableListIterator
<
E
>
{
override
fun
hasPrevious
():
Boolean
=
false
override
fun
nextIndex
():
Int
=
-
1
override
fun
previous
():
E
=
throw
NoSuchElementException
()
override
fun
previousIndex
():
Int
=
-
1
override
fun
add
(
element
:
E
)
=
throw
UnsupportedOperationException
()
override
fun
hasNext
():
Boolean
=
false
override
fun
next
():
E
=
throw
NoSuchElementException
()
override
fun
remove
()
=
throw
NoSuchElementException
()
override
fun
set
(
element
:
E
)
=
throw
UnsupportedOperationException
()
}
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