Forums WoW Modding Support Archives Azerothcore Discord Archives [DiscordArchive] so.... mb delete the has_items variable since it's unused otherwise?

[DiscordArchive] so.... mb delete the has_items variable since it's unused otherwise?

[DiscordArchive] so.... mb delete the has_items variable since it's unused otherwise?

Pages (4): Previous 1 2 3 4 Next
rektbyfaith
Administrator
0
05-11-2020, 08:16 PM
#21
Archived author: MishaParem • Posted: 2020-05-11T20:16:08.320000+00:00
Original source

according to the commits that <@!224931509046345729> found, using has_item in the if statement causes a bug where not all items are recieved
rektbyfaith
05-11-2020, 08:16 PM #21

Archived author: MishaParem • Posted: 2020-05-11T20:16:08.320000+00:00
Original source

according to the commits that <@!224931509046345729> found, using has_item in the if statement causes a bug where not all items are recieved

rektbyfaith
Administrator
0
05-11-2020, 08:16 PM
#22
Archived author: MishaParem • Posted: 2020-05-11T20:16:51.785000+00:00
Original source

however, if we don't use it in the if statement, then I get a compiler warning
rektbyfaith
05-11-2020, 08:16 PM #22

Archived author: MishaParem • Posted: 2020-05-11T20:16:51.785000+00:00
Original source

however, if we don't use it in the if statement, then I get a compiler warning

rektbyfaith
Administrator
0
05-11-2020, 08:18 PM
#23
Archived author: MishaParem • Posted: 2020-05-11T20:18:08.015000+00:00
Original source

in the context of that function, has_item is not used anywhere else, so the solution I propose is either:
- remove the has_item bool altogether
- add has_item to the Mail struct
rektbyfaith
05-11-2020, 08:18 PM #23

Archived author: MishaParem • Posted: 2020-05-11T20:18:08.015000+00:00
Original source

in the context of that function, has_item is not used anywhere else, so the solution I propose is either:
- remove the has_item bool altogether
- add has_item to the Mail struct

rektbyfaith
Administrator
0
05-11-2020, 08:18 PM
#24
Archived author: MishaParem • Posted: 2020-05-11T20:18:20.296000+00:00
Original source

your thoughts, <@!108617457836539904> ?
rektbyfaith
05-11-2020, 08:18 PM #24

Archived author: MishaParem • Posted: 2020-05-11T20:18:20.296000+00:00
Original source

your thoughts, <@!108617457836539904> ?

rektbyfaith
Administrator
0
05-11-2020, 08:25 PM
#25
Archived author: Yehonal • Posted: 2020-05-11T20:25:18.732000+00:00
Original source

well, the most elegant solution would be to use a proper Entity class for those fields instead of using them directly into the if condition.

However, it requires more work, you can safely delete the has_items
rektbyfaith
05-11-2020, 08:25 PM #25

Archived author: Yehonal • Posted: 2020-05-11T20:25:18.732000+00:00
Original source

well, the most elegant solution would be to use a proper Entity class for those fields instead of using them directly into the if condition.

However, it requires more work, you can safely delete the has_items

rektbyfaith
Administrator
0
05-11-2020, 08:26 PM
#26
Archived author: MishaParem • Posted: 2020-05-11T20:26:07.012000+00:00
Original source

as in, create a mail entiity class?
rektbyfaith
05-11-2020, 08:26 PM #26

Archived author: MishaParem • Posted: 2020-05-11T20:26:07.012000+00:00
Original source

as in, create a mail entiity class?

rektbyfaith
Administrator
0
05-11-2020, 08:26 PM
#27
Archived author: Yehonal • Posted: 2020-05-11T20:26:53.300000+00:00
Original source

let me check 1 sec
rektbyfaith
05-11-2020, 08:26 PM #27

Archived author: Yehonal • Posted: 2020-05-11T20:26:53.300000+00:00
Original source

let me check 1 sec

rektbyfaith
Administrator
0
05-11-2020, 08:38 PM
#28
Archived author: Yehonal • Posted: 2020-05-11T20:38:41.104000+00:00
Original source

nope, it's useless to store that value within the Mail structure. the has_item can be easily removed since it's just used in that condition statement to fill the items list
rektbyfaith
05-11-2020, 08:38 PM #28

Archived author: Yehonal • Posted: 2020-05-11T20:38:41.104000+00:00
Original source

nope, it's useless to store that value within the Mail structure. the has_item can be easily removed since it's just used in that condition statement to fill the items list

rektbyfaith
Administrator
0
05-11-2020, 08:39 PM
#29
Archived author: Yehonal • Posted: 2020-05-11T20:39:31.641000+00:00
Original source

then the struct has an internal hasItem method:

``` bool HasItems() const { return !items.empty(); }```
rektbyfaith
05-11-2020, 08:39 PM #29

Archived author: Yehonal • Posted: 2020-05-11T20:39:31.641000+00:00
Original source

then the struct has an internal hasItem method:

``` bool HasItems() const { return !items.empty(); }```

rektbyfaith
Administrator
0
05-11-2020, 08:41 PM
#30
Archived author: MishaParem • Posted: 2020-05-11T20:41:58.798000+00:00
Original source

ok. removed has_item. not sure when I'll get to the PR for it, mb tomorrow. I've been chewing on warnings all day, and I'm still compiling only to 30%. mb I'm doing it wrong, mb I should compile w/o -Werrors and read all the errors post factum
rektbyfaith
05-11-2020, 08:41 PM #30

Archived author: MishaParem • Posted: 2020-05-11T20:41:58.798000+00:00
Original source

ok. removed has_item. not sure when I'll get to the PR for it, mb tomorrow. I've been chewing on warnings all day, and I'm still compiling only to 30%. mb I'm doing it wrong, mb I should compile w/o -Werrors and read all the errors post factum

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