summaryrefslogtreecommitdiffstats
path: root/scene/gui/color_picker.cpp
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2017-01-07 18:25:37 -0300
committerJuan Linietsky <reduzio@gmail.com>2017-01-07 18:26:38 -0300
commit2ab83e1abbf5ee6d00e16056a9e9394114026f28 (patch)
tree7efbb375cc4d00d8e8589fcf1b6a1303bec5df2d /scene/gui/color_picker.cpp
parent2a38a5eaa844043b846e03d6655f84caf8a31e74 (diff)
downloadredot-engine-2ab83e1abbf5ee6d00e16056a9e9394114026f28.tar.gz
Memory pool vectors (DVector) have been enormously simplified in code, and renamed to PoolVector
Diffstat (limited to 'scene/gui/color_picker.cpp')
-rw-r--r--scene/gui/color_picker.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/scene/gui/color_picker.cpp b/scene/gui/color_picker.cpp
index ceb3b69f2f..10f4ae9fec 100644
--- a/scene/gui/color_picker.cpp
+++ b/scene/gui/color_picker.cpp
@@ -170,11 +170,11 @@ void ColorPicker::_update_presets()
Size2 size=bt_add_preset->get_size();
preset->set_custom_minimum_size(Size2(size.width*presets.size(),size.height));
- DVector<uint8_t> img;
+ PoolVector<uint8_t> img;
img.resize(size.x*presets.size()*size.y*3);
{
- DVector<uint8_t>::Write w=img.write();
+ PoolVector<uint8_t>::Write w=img.write();
for (int y=0;y<size.y;y++) {
for (int x=0;x<size.x*presets.size();x++) {
int ofs = (y*(size.x*presets.size())+x)*3;
@@ -421,7 +421,7 @@ void ColorPicker::_screen_input(const InputEvent &ev)
int pw = last_capture.get_format()==Image::FORMAT_RGBA8?4:3;
int ofs = (mev.global_y*last_capture.get_width()+mev.global_x)*pw;
- DVector<uint8_t>::Read r = last_capture.get_data().read();
+ PoolVector<uint8_t>::Read r = last_capture.get_data().read();
Color c( r[ofs+0]/255.0, r[ofs+1]/255.0, r[ofs+2]/255.0 );