Mercurial > hg > octave-lojdl
changeset 8090:3cc1ca1b1576
MSVC compilation fix
author | Michael Goffioul |
---|---|
date | Mon, 08 Sep 2008 15:28:45 -0400 |
parents | 0ec09255515a |
children | 4e7527a7b3f9 |
files | src/ChangeLog src/DLD-FUNCTIONS/__magick_read__.cc src/graphics.cc |
diffstat | 3 files changed, 17 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,13 @@ +2008-09-08 Michael Goffioul <michael.goffioul@gmail.com> + + * DLD-FUNCTIONS/__magick_read__.cc (encode_uint_image): Resolve "pow" + ambiguity. + + * graphics.cc (base_properties::get_dynamic, + base_properties::set_dynamic, base_propertyes::get_property_dynamic): + Add the 3rd template parameter to std::map, corresponding to all_props + field. + 2008-09-08 John W. Eaton <jwe@octave.org> * ls-oct-ascii.cc (std::string extract_keyword (std::istream&,
--- a/src/DLD-FUNCTIONS/__magick_read__.cc +++ b/src/DLD-FUNCTIONS/__magick_read__.cc @@ -567,7 +567,9 @@ Array<octave_idx_type> idx (dsizes.length ()); octave_idx_type rows = m.rows (); octave_idx_type columns = m.columns (); - unsigned int div_factor = pow (2, bitdepth) - 1; + + // FIXME -- maybe simply using bit shifting would be better? + unsigned int div_factor = pow (2.0, static_cast<int> (bitdepth)) - 1; for (unsigned int ii = 0; ii < nframes; ii++) {
--- a/src/graphics.cc +++ b/src/graphics.cc @@ -1549,7 +1549,7 @@ { octave_value retval; - std::map<caseless_str, property>::const_iterator it = all_props.find (name); + std::map<caseless_str, property, cmp_caseless_str>::const_iterator it = all_props.find (name); if (it != all_props.end ()) retval = it->second.get (); @@ -1564,7 +1564,7 @@ { Octave_map m; - for (std::map<caseless_str, property>::const_iterator it = all_props.begin (); + for (std::map<caseless_str, property, cmp_caseless_str>::const_iterator it = all_props.begin (); it != all_props.end (); ++it) if (all || ! it->second.is_hidden ()) m.assign (it->second.get_name (), it->second.get ()); @@ -1575,7 +1575,7 @@ void base_properties::set_dynamic (const caseless_str& name, const octave_value& val) { - std::map<caseless_str, property>::iterator it = all_props.find (name); + std::map<caseless_str, property, cmp_caseless_str>::iterator it = all_props.find (name); if (it != all_props.end ()) it->second.set (val); @@ -1589,7 +1589,7 @@ property base_properties::get_property_dynamic (const caseless_str& name) { - std::map<caseless_str, property>::const_iterator it = all_props.find (name); + std::map<caseless_str, property, cmp_caseless_str>::const_iterator it = all_props.find (name); if (it == all_props.end ()) {