WordPress.org

Make WordPress Core

Changes between Version 2 and Version 3 of Ticket #14889, comment 25


Ignore:
Timestamp:
06/08/11 13:15:30 (3 years ago)
Author:
hakre
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #14889, comment 25

    v2 v3  
    11@aaroncampbell: If it's now fine to have a function for that, I would be confident with it as well. But IIRC earlier in this or a related ticket it was criticized to have an additional function for it. So a decision whether or not would be useful. 
    22 
    3 Added: The function you propose can return (float) already so you can spare the casts when used. I'm unsure if (int) is okay because the int-range might be triggered when gigabyte values are calculated as bytes. 
     3Added: The function you propose can return (float) already so you can spare the casts when used. (int) can not be used because of integer overflows, so probably a round() of the bytes calculated. 
    44 
    55Added2: {{{@see wp_convert_hr_to_bytes}}}