Forums WoW Modding Support Archives TrinityCore Discord Archives [DiscordArchive] the reason why you set the lambda as mutable is because targets is const and you updated them at off

[DiscordArchive] the reason why you set the lambda as mutable is because targets is const and you updated them at off

[DiscordArchive] the reason why you set the lambda as mutable is because targets is const and you updated them at off

Pages (2): 1 2 Next
rektbyfaith
Administrator
0
01-15-2025, 11:31 PM
#1
Archived author: Telegrill • Posted: 2025-01-15T23:31:23.010000+00:00
Original source

the reason why you set the lambda as mutable is because targets is const and you updated them at offset, right?
rektbyfaith
01-15-2025, 11:31 PM #1

Archived author: Telegrill • Posted: 2025-01-15T23:31:23.010000+00:00
Original source

the reason why you set the lambda as mutable is because targets is const and you updated them at offset, right?

rektbyfaith
Administrator
0
01-15-2025, 11:32 PM
#2
Archived author: Telegrill • Posted: 2025-01-15T23:32:17.818000+00:00
Original source

I assume the code wouldn't let you call Update at all without mutable
rektbyfaith
01-15-2025, 11:32 PM #2

Archived author: Telegrill • Posted: 2025-01-15T23:32:17.818000+00:00
Original source

I assume the code wouldn't let you call Update at all without mutable

rektbyfaith
Administrator
0
01-15-2025, 11:32 PM
#3
Archived author: Telegrill • Posted: 2025-01-15T23:32:39.810000+00:00
Original source

since the variable is captured by value?
rektbyfaith
01-15-2025, 11:32 PM #3

Archived author: Telegrill • Posted: 2025-01-15T23:32:39.810000+00:00
Original source

since the variable is captured by value?

rektbyfaith
Administrator
0
01-15-2025, 11:37 PM
#4
Archived author: Tea • Posted: 2025-01-15T23:37:48.831000+00:00
Original source

basically lambda compiles to this
rektbyfaith
01-15-2025, 11:37 PM #4

Archived author: Tea • Posted: 2025-01-15T23:37:48.831000+00:00
Original source

basically lambda compiles to this

rektbyfaith
Administrator
0
01-15-2025, 11:37 PM
#5
Archived author: Tea • Posted: 2025-01-15T23:37:52.781000+00:00
Original source

```
struct Lambda
{
auto operator()() const
{
// body
}

Capture1 _1;
Capture2 _2;
// ...
}
```
rektbyfaith
01-15-2025, 11:37 PM #5

Archived author: Tea • Posted: 2025-01-15T23:37:52.781000+00:00
Original source

```
struct Lambda
{
auto operator()() const
{
// body
}

Capture1 _1;
Capture2 _2;
// ...
}
```

rektbyfaith
Administrator
0
01-15-2025, 11:37 PM
#6
Archived author: Tea • Posted: 2025-01-15T23:37:59.877000+00:00
Original source

notice the const on the function
rektbyfaith
01-15-2025, 11:37 PM #6

Archived author: Tea • Posted: 2025-01-15T23:37:59.877000+00:00
Original source

notice the const on the function

rektbyfaith
Administrator
0
01-15-2025, 11:38 PM
#7
Archived author: Tea • Posted: 2025-01-15T23:38:04.077000+00:00
Original source

its there by default
rektbyfaith
01-15-2025, 11:38 PM #7

Archived author: Tea • Posted: 2025-01-15T23:38:04.077000+00:00
Original source

its there by default

rektbyfaith
Administrator
0
01-15-2025, 11:38 PM
#8
Archived author: Tea • Posted: 2025-01-15T23:38:07.794000+00:00
Original source

mutable removes it
rektbyfaith
01-15-2025, 11:38 PM #8

Archived author: Tea • Posted: 2025-01-15T23:38:07.794000+00:00
Original source

mutable removes it

rektbyfaith
Administrator
0
01-15-2025, 11:38 PM
#9
Archived author: Tea • Posted: 2025-01-15T23:38:32.038000+00:00
Original source

which lets you call non-const marked member functions of captured variables
rektbyfaith
01-15-2025, 11:38 PM #9

Archived author: Tea • Posted: 2025-01-15T23:38:32.038000+00:00
Original source

which lets you call non-const marked member functions of captured variables

rektbyfaith
Administrator
0
01-15-2025, 11:39 PM
#10
Archived author: Telegrill • Posted: 2025-01-15T23:39:52.472000+00:00
Original source

I see, that makes sense
rektbyfaith
01-15-2025, 11:39 PM #10

Archived author: Telegrill • Posted: 2025-01-15T23:39:52.472000+00:00
Original source

I see, that makes sense

Pages (2): 1 2 Next
Recently Browsing
 1 Guest(s)
Recently Browsing
 1 Guest(s)