Config
Log for #openttd.dev on 25th February 2013:
Times are UTC Toggle Colours
03:27:29  *** Webster has joined #openttd.dev
03:27:29  *** ChanServ sets mode: +v Webster
03:29:04  *** Yexo has quit IRC
03:29:15  *** Yexo has joined #openttd.dev
04:00:04  *** Supercheese has quit IRC
04:00:33  *** Supercheese has joined #openttd.dev
08:41:02  *** Supercheese has quit IRC
08:57:03  *** fonsinchen has joined #openttd.dev
08:57:03  *** ChanServ sets mode: +v fonsinchen
11:33:13  <fonsinchen> What's the recommended thing to do if CanAllocateItem returns false?
11:33:57  <fonsinchen> In most cases we have to abort then, so I can basically always assert on that.
11:34:01  <fonsinchen> Right?
11:36:19  <fonsinchen> I should make sure the pool allows for enough items to be created of course.
12:17:30  *** ChanServ sets mode: +v Rubidium
12:17:35  <Rubidium> no, an assert on CanAllocateItem is bad
12:17:51  <Rubidium> asserts can be compile out of the source
12:18:11  <Rubidium> also, CanAllocateItem is often in the main code at places where you rather not crash (like commands)
12:18:52  <Rubidium> I've got no idea what the pool will be used for though, so I can't really give a sensible answer
12:26:54  <fonsinchen> I have a pool for link graphs and one for link graph jobs.
12:27:21  <fonsinchen> I'm making both large enough so that there can theoretically be 32 graphs and 32 jobs for each station.
12:27:56  <fonsinchen> It should always be able to allocate a link graph or a link graph job then if there's no mistake in the game logic.
12:29:20  <fonsinchen> Or rather: If I cannot allocate a link graph when I need one I'm out of luck and need to kill the game to avoid desyncs.
12:29:46  <Rubidium> then rather do if (!CanAllocate()) { /* Some comment explaining why it can't happen. */ NOT_REACHED(); }
12:37:57  <fonsinchen> fine
13:36:05  *** ntoskrnl has joined #openttd.dev
15:48:54  *** fonsinchen has quit IRC
17:09:32  *** LordAro has joined #openttd.dev
17:09:32  *** ChanServ sets mode: +v LordAro
17:44:59  *** frosch123 has joined #openttd.dev
17:44:59  *** ChanServ sets mode: +v frosch123
18:27:49  *** ntoskrnl has quit IRC
18:43:43  *** DorpsGek changes topic to "OpenTTD Dev Channel || Latest SVN: r25048 || Logs: http://webster.openttdcoop.org/?channel=openttd.dev || Voice (talk-right) upon request via #openttd; make sure you are registered to NickServ before asking"
19:22:24  *** Lord_Aro has joined #openttd.dev
19:22:24  *** LordAro is now known as Guest223
19:22:24  *** ChanServ sets mode: +v Lord_Aro
19:22:24  *** Lord_Aro is now known as LordAro
19:28:23  *** Guest223 has quit IRC
21:10:17  *** frosch123 has quit IRC
23:05:53  *** LordAro has quit IRC

Powered by YARRSTE version: svn-trunk