# HG changeset patch # User Michael Goffioul # Date 1220902125 14400 # Node ID 3cc1ca1b15763610fa534b23a9c4fd70c280785e # Parent 0ec09255515a761aa2b4c7b57cda3bea23c7355d MSVC compilation fix diff --git a/src/ChangeLog b/src/ChangeLog --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,13 @@ +2008-09-08 Michael Goffioul + + * 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 * ls-oct-ascii.cc (std::string extract_keyword (std::istream&, diff --git a/src/DLD-FUNCTIONS/__magick_read__.cc b/src/DLD-FUNCTIONS/__magick_read__.cc --- a/src/DLD-FUNCTIONS/__magick_read__.cc +++ b/src/DLD-FUNCTIONS/__magick_read__.cc @@ -567,7 +567,9 @@ Array 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 (bitdepth)) - 1; for (unsigned int ii = 0; ii < nframes; ii++) { diff --git a/src/graphics.cc b/src/graphics.cc --- a/src/graphics.cc +++ b/src/graphics.cc @@ -1549,7 +1549,7 @@ { octave_value retval; - std::map::const_iterator it = all_props.find (name); + std::map::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::const_iterator it = all_props.begin (); + for (std::map::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::iterator it = all_props.find (name); + std::map::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::const_iterator it = all_props.find (name); + std::map::const_iterator it = all_props.find (name); if (it == all_props.end ()) {