Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve std.conv #181

Merged
merged 28 commits into from Aug 23, 2011
Merged

Improve std.conv #181

merged 28 commits into from Aug 23, 2011

Conversation

9rnsr
Copy link
Contributor

@9rnsr 9rnsr commented Aug 10, 2011

Cleanup code:

  • 639b099 - Remove dead code.
    They have been no longer used - parseIntegral, parseFloating, toIfloat, toIdouble, toIreal, toCfloat, toCdouble, toCreal, getComplexStrings
  • f176fde - Remove duplicate unittests
    Some unittests are redundant, so remove them.

Bug fixes:

  • d74bb14 - Fix octal and enable part of its unittest.
  • 3b7dd27 and 03a76d8 - Support parse!dchar(dstring) behave like chomp
  • 277c7a7 - Fix const(bool) parsing.

@jmdavis
Copy link
Member

jmdavis commented Aug 10, 2011

On a related note, since you've been doing a fair bit of work on std.conv, you might want to consider implementing issue 6377. I tried to, but ran into errors regarding forward declarations and the like and gave up for the time being. But since you're obviously familiar with the code, you'd probably have a better shot at getting it to work.

@9rnsr
Copy link
Contributor Author

9rnsr commented Aug 11, 2011

I found a bit problem while using parse!Char(String) function other place.
It should allow getting front with both slicing (-> char, wchar, and dchar) and decoding (-> dchar).

@9rnsr
Copy link
Contributor Author

9rnsr commented Aug 11, 2011

Reply to jmdavis:
Interesting. I didn't know that issue. I'd like to implement it.


while (exp > 0)
for (int j = 0; j < errors.length; j++)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This loop should probably be

foreach(j, s; errors)

The same goes for the other loops just like it.

@9rnsr
Copy link
Contributor Author

9rnsr commented Aug 13, 2011

Integrate similar tests by using foreach and TypeTuple.
And more fixes.

@9rnsr
Copy link
Contributor Author

9rnsr commented Aug 13, 2011

On a related note, since you've been doing a fair bit of work on std.conv, you might want to consider implementing issue 6377. I tried to, but ran into errors regarding forward declarations and the like and gave up for the time being. But since you're obviously familiar with the code, you'd probably have a better shot at getting it to work.

I have tried to implement it, see #185.

@andralex
Copy link
Member

Let's wait for Kenji's additions before reviewing this again.

@9rnsr
Copy link
Contributor Author

9rnsr commented Aug 16, 2011

This request does not introduce new features; does only fixing bugs, cleaning up tests, and remove unused codes.

Let's wait for Kenji's additions before reviewing this again.

I have already fixed the matter Jonathan's pointed out two days before.

Thanks.

@9rnsr
Copy link
Contributor Author

9rnsr commented Aug 23, 2011

Apply @jmdavis's fixes, and rebase commits onto git master.

@jmdavis
Copy link
Member

jmdavis commented Aug 23, 2011

Merging in.

jmdavis added a commit that referenced this pull request Aug 23, 2011
@jmdavis jmdavis merged commit 0083007 into dlang:master Aug 23, 2011
kuettler pushed a commit to kuettler/phobos that referenced this pull request Feb 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants