[phobos] [D-Programming-Language/phobos] d10fea: Fix issue 13425 - DList.linearRemove on last...

GitHub via phobos phobos at puremagic.com
Mon Sep 8 13:20:30 PDT 2014


  Branch: refs/heads/master
  Home:   https://github.com/D-Programming-Language/phobos
  Commit: d10fea94d5ba6cb18ba98cb59ecbee21fef3dc82
      https://github.com/D-Programming-Language/phobos/commit/d10fea94d5ba6cb18ba98cb59ecbee21fef3dc82
  Author: monarch dodra <monarchdodra at gmail.com>
  Date:   2014-09-08 (Mon, 08 Sep 2014)

  Changed paths:
    M std/container/dlist.d

  Log Message:
  -----------
  Fix issue 13425 - DList.linearRemove on last...

...element returns non-empty range.

The main issue is that DList.Range is implemented in terms of "first and last" as opposed to "first and past last", which means you have to special-case empty ranges. The fix is to do the same thing as in `opSlice`, and to explicitly initialize a null Range when it is empty.


  Commit: 320d5e7e4714eb70cec641ef67f7ea9cd61b8eaa
      https://github.com/D-Programming-Language/phobos/commit/320d5e7e4714eb70cec641ef67f7ea9cd61b8eaa
  Author: Andrej Mitrovic <andrej.mitrovich at gmail.com>
  Date:   2014-09-08 (Mon, 08 Sep 2014)

  Changed paths:
    M std/container/dlist.d

  Log Message:
  -----------
  Merge pull request #2497 from monarchdodra/DListRemove

Fix issue 13425 - DList.linearRemove on last...


Compare: https://github.com/D-Programming-Language/phobos/compare/fc84b758f49c...320d5e7e4714


More information about the phobos mailing list