You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@weex.apache.org by GitBox <gi...@apache.org> on 2018/09/21 11:24:03 UTC

[GitHub] YorkShen commented on a change in pull request #1561: * [android] Add deviation to meta

YorkShen commented on a change in pull request #1561: * [android] Add deviation to meta
URL: https://github.com/apache/incubator-weex/pull/1561#discussion_r219464815
 
 

 ##########
 File path: weex_core/Source/core/render/manager/render_manager.cpp
 ##########
 @@ -47,13 +47,20 @@ bool RenderManager::CreatePage(const std::string& page_id, const char *data) {
   RenderPage *page = new RenderPage(page_id);
   pages_.insert(std::pair<std::string, RenderPage *>(page_id, page));
 
-  std::map<std::string, float>::iterator iter =
+  std::map<std::string, float>::iterator iter_viewport =
       this->viewports_.find(page_id);
-  if (iter != this->viewports_.end()) {
-    this->set_viewport_width(page_id, iter->second);
+  if (iter_viewport != this->viewports_.end()) {
+    this->set_viewport_width(page_id, iter_viewport->second);
     this->viewports_.erase(page_id);
   }
 
+  std::map<std::string, bool>::iterator iter_deviation =
+      this->round_off_deviations_.find(page_id);
+  if (iter_deviation != this->round_off_deviations_.end()) {
+    this->set_round_off_deviation(page_id, iter_deviation->second);
+    this->round_off_deviations_.erase(page_id);
 
 Review comment:
   Why invoke `round_off_deviations_.erase`

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services