Forums WoW Modding Support Archives TrinityCore Discord Archives [DiscordArchive] what about the case of (!cell.NoCreate()) being true ?

[DiscordArchive] what about the case of (!cell.NoCreate()) being true ?

[DiscordArchive] what about the case of (!cell.NoCreate()) being true ?

Pages (3): Previous 1 2 3 Next
rektbyfaith
Administrator
0
03-22-2023, 08:57 PM
#11
Archived author: jackpoz • Posted: 2023-03-22T20:57:56.155000+00:00
Original source

I personally do not prefer duplicating shared logic in 2 { } so close by
rektbyfaith
03-22-2023, 08:57 PM #11

Archived author: jackpoz • Posted: 2023-03-22T20:57:56.155000+00:00
Original source

I personally do not prefer duplicating shared logic in 2 { } so close by

rektbyfaith
Administrator
0
03-22-2023, 09:02 PM
#12
Archived author: Gamemechanic • Posted: 2023-03-22T21:02:21.618000+00:00
Original source

Yea, i had the same feeling. But creating a variable when we can avoid it, doesn't feel right either.
rektbyfaith
03-22-2023, 09:02 PM #12

Archived author: Gamemechanic • Posted: 2023-03-22T21:02:21.618000+00:00
Original source

Yea, i had the same feeling. But creating a variable when we can avoid it, doesn't feel right either.

rektbyfaith
Administrator
0
03-22-2023, 09:02 PM
#13
Archived author: Gamemechanic • Posted: 2023-03-22T21:02:35.071000+00:00
Original source

```c++
if (!cell.NoCreate())
{
EnsureGridLoaded(cell);
}
else if (!IsGridLoaded(GridCoord(x, y))
{
Return;
}
getNGrid(x, y)->VisitGrid(cell_x, cell_y, visitor);
```
rektbyfaith
03-22-2023, 09:02 PM #13

Archived author: Gamemechanic • Posted: 2023-03-22T21:02:35.071000+00:00
Original source

```c++
if (!cell.NoCreate())
{
EnsureGridLoaded(cell);
}
else if (!IsGridLoaded(GridCoord(x, y))
{
Return;
}
getNGrid(x, y)->VisitGrid(cell_x, cell_y, visitor);
```

rektbyfaith
Administrator
0
03-22-2023, 09:06 PM
#14
Archived author: jackpoz • Posted: 2023-03-22T21:06:28.682000+00:00
Original source

you mean for the codestyle ?
rektbyfaith
03-22-2023, 09:06 PM #14

Archived author: jackpoz • Posted: 2023-03-22T21:06:28.682000+00:00
Original source

you mean for the codestyle ?

rektbyfaith
Administrator
0
03-22-2023, 09:06 PM
#15
Archived author: jackpoz • Posted: 2023-03-22T21:06:45.647000+00:00
Original source

because the compiler will most likely remove the variable, if you are worried about performances
rektbyfaith
03-22-2023, 09:06 PM #15

Archived author: jackpoz • Posted: 2023-03-22T21:06:45.647000+00:00
Original source

because the compiler will most likely remove the variable, if you are worried about performances

rektbyfaith
Administrator
0
03-22-2023, 09:07 PM
#16
Archived author: jackpoz • Posted: 2023-03-22T21:07:36.914000+00:00
Original source

we could use goto!
rektbyfaith
03-22-2023, 09:07 PM #16

Archived author: jackpoz • Posted: 2023-03-22T21:07:36.914000+00:00
Original source

we could use goto!

rektbyfaith
Administrator
0
03-22-2023, 09:10 PM
#17
Archived author: Gamemechanic • Posted: 2023-03-22T21:10:10.813000+00:00
Original source

ye, and to avoid getting bad habits
rektbyfaith
03-22-2023, 09:10 PM #17

Archived author: Gamemechanic • Posted: 2023-03-22T21:10:10.813000+00:00
Original source

ye, and to avoid getting bad habits

rektbyfaith
Administrator
0
03-22-2023, 09:10 PM
#18
Archived author: Gamemechanic • Posted: 2023-03-22T21:10:18.698000+00:00
Original source

GOTO is a beast!
rektbyfaith
03-22-2023, 09:10 PM #18

Archived author: Gamemechanic • Posted: 2023-03-22T21:10:18.698000+00:00
Original source

GOTO is a beast!

rektbyfaith
Administrator
0
03-22-2023, 09:13 PM
#19
Archived author: jackpoz • Posted: 2023-03-22T21:13:04.414000+00:00
Original source

I personally prefer return early when possible, or variables
rektbyfaith
03-22-2023, 09:13 PM #19

Archived author: jackpoz • Posted: 2023-03-22T21:13:04.414000+00:00
Original source

I personally prefer return early when possible, or variables

rektbyfaith
Administrator
0
03-22-2023, 09:46 PM
#20
Archived author: Heisenberg • Posted: 2023-03-22T21:46:34.079000+00:00
Original source

<@228947336800370689> yes
rektbyfaith
03-22-2023, 09:46 PM #20

Archived author: Heisenberg • Posted: 2023-03-22T21:46:34.079000+00:00
Original source

<@228947336800370689> yes

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