(CFACT-124) Refactor the processor resolver.

I'll try; might take a little more work if AppVeyor's declaring anything on
stderr an error.

On Thu, Oct 2, 2014 at 3:38 PM, Peter Huene <notifications@github.com>
wrote:

> In lib/src/util/string.cc:
>
> > +
> > +        if (freq < 1000) {
> > +            return to_string(freq) + " Hz";
> > +        }
> > +        unsigned int exp = floor(log10(freq) / 3.0);
> > +        double converted = round(100.0 * (freq / pow(1000.0, exp))) / 100.0;
> > +
> > +        // Check to see if rounding up gets us to 1000; if so, move to the next unit
> > +        if (fabs(converted - 1000.0) < numeric_limits<double>::epsilon()) {
> > +            converted = 1.00;
> > +            ++exp;
> > +        }
> > +
> > +        // If we exceed the SI prefix (we shouldn't, but just in case), just return the speed in Hz
> > +        if (exp - 1 >= sizeof(prefixes)) {
> > +            return to_string(freq) + " Hz";
>
> Can we use ctest -V for AppVeyor like we do for Travis? Makes seeing the
> errors easier, imo.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/puppetlabs/cfacter/pull/156/files#r18372552>.
>