plus

74

--- a/src/Ufopaedia/ArticleStateTFTD.h
+++ b/src/Ufopaedia/ArticleStateTFTD.h
@@ -24,14 +24,11 @@
 
 namespace OpenXcom
 {
-	class Game;
 	class Text;
-	class TextButton;
-	class ArticleStateTextImage;
 	class ArticleDefinitionTFTD;
 
 	/**
-	 * ArticleStateTextImage has a title, text block and a background image.
+	 * Every TFTD article has a title, text block and a background image, with little to no variation.
 	 */
 
 	class ArticleStateTFTD : public ArticleState
@@ -43,7 +40,6 @@ namespace OpenXcom
 	protected:
 		Text *_txtTitle;
 		Text *_txtInfo;
-		TextButton *_btnTitle;
 	};
 }
 
plus

10

--- a/lib/fullstory/test.js
+++ b/lib/fullstory/test.js
@@ -81,6 +81,26 @@ describe('FullStory', function(){
         analytics.identify('id', { name: 'Test', email: 'test@test.com' });
         analytics.called(window.FS.identify, 'id', { displayName: 'Test', email: 'test@test.com' });
       });
+
+      it('should map integers properly', function(){
+        analytics.identify('id', { name: 'Test', revenue: 7 });
+        analytics.called(window.FS.identify, 'id', { displayName: 'Test', revenue_int: 7 });
+      });
+
+      it('should map floats properly', function(){
+        analytics.identify('id1', { name: 'Example', amtAbandonedInCart: 3.84 });
+        analytics.called(window.FS.identify, 'id1', { displayName: 'Example', amtAbandonedInCart_real: 3.84 });
+      });
+
+      it('should map dates properly', function(){
+        analytics.identify('id2', { name: 'Test123', signupDate: new Date("2014-03-11T13:19:23Z") });
+        analytics.called(window.FS.identify, 'id2', { displayName: 'Test123', signupDate_date: new Date("2014-03-11T13:19:23Z") });
+      });
+
+      it('should map booleans properly', function(){
+        analytics.identify('id3', { name: 'Steven', registered: true });
+        analytics.called(window.FS.identify, 'id3', { displayName: 'Steven', registered_bool: true });
+      });
     });
   });
 });
plus

78

--- a/include/rapidjson/filewritestream.h
+++ b/include/rapidjson/filewritestream.h
@@ -34,7 +34,7 @@ class FileWriteStream {
 public:
     typedef char Ch;    //!< Character type. Only support char.
 
-    FileWriteStream(FILE* fp, char* buffer, size_t bufferSize) : fp_(fp), buffer_(buffer), bufferEnd_(buffer + bufferSize), current_(buffer_) { 
+    FileWriteStream(std::FILE* fp, char* buffer, size_t bufferSize) : fp_(fp), buffer_(buffer), bufferEnd_(buffer + bufferSize), current_(buffer_) { 
         RAPIDJSON_ASSERT(fp_ != 0);
     }
 
@@ -80,7 +80,7 @@ class FileWriteStream {
     FileWriteStream(const FileWriteStream&);
     FileWriteStream& operator=(const FileWriteStream&);
 
-    FILE* fp_;
+    std::FILE* fp_;
     char *buffer_;
     char *bufferEnd_;
     char *current_;
plus

10

--- a/src/autowiring/test/AutoConfigTest.cpp
+++ b/src/autowiring/test/AutoConfigTest.cpp
@@ -67,6 +67,19 @@ TEST_F(AutoConfigTest, VerifyRecursiveSearch) {
   }
 }
 
+struct DefaultName {
+  AutoConfig<int, struct defaultname1> m_def;
+};
+
+TEST_F(AutoConfigTest, DefaultNamespace) {
+  AutoRequired<AutoConfigManager> acm;
+  acm->Set("defaultname1", 123);
+  
+  AutoRequired<DefaultName> def;
+  
+  ASSERT_EQ(123, *def->m_def);
+}
+
 TEST_F(AutoConfigTest, VerifyParsedAssignment) {
   // We must also be able to support implicit string-to-type conversion via the shift operator for this type
   AutoRequired<AutoConfigManager> acm;
plus

20

--- a/src/main/java/crazypants/enderio/machine/farm/TileFarmStation.java
+++ b/src/main/java/crazypants/enderio/machine/farm/TileFarmStation.java
@@ -530,15 +530,18 @@ public void setCapacitor(Capacitors capacitorType) {
     int ppt = getPowerUsePerTick();
     switch (capacitorType.ordinal()) {
     case 1:
-      cap = new BasicCapacitor(ppt * 4, 500000);
+      cap = new BasicCapacitor(ppt * 40, 500000);
       break;
     case 2:
-      cap = new BasicCapacitor(ppt * 4, 1000000);
+      cap = new BasicCapacitor(ppt * 40, 1000000);
       break;
     default:
-      cap = new BasicCapacitor(ppt * 4, 250000);
+      cap = new BasicCapacitor(ppt * 40, 250000);
       break;
     }
+    if(getEnergyStored() > getMaxEnergyStored()) {
+      setEnergyStored(getMaxEnergyStored());
+    }
     
   }
 
plus

29

--- a/include/bbcode.php
+++ b/include/bbcode.php
@@ -431,14 +431,16 @@ function bbcode($Text,$preserve_nl = false, $tryoembed = true) {
 
 	// replace [observer.baseurl]
 	if ($observer) {
+		$s1 = '<span class="bb_observer">';
+		$s2 = '</span>';
 		$obsBaseURL = $observer['xchan_connurl'];
 		$obsBaseURL = preg_replace("/\/poco\/.*$/", '', $obsBaseURL);
 		$Text = str_replace('[observer.baseurl]', $obsBaseURL, $Text);
 		$Text = str_replace('[observer.url]',$observer['xchan_url'], $Text);
-		$Text = str_replace('[observer.name]',$observer['xchan_name'], $Text);
-		$Text = str_replace('[observer.address]',$observer['xchan_addr'], $Text);
-		$Text = str_replace('[observer.webname]',substr($observer['xchan_addr'],0,strpos($observer['xchan_addr'],'@')), $Text);
-		$Text = str_replace('[observer.photo]','[zmg]'.$observer['xchan_photo_l'].'[/zmg]', $Text);				
+		$Text = str_replace('[observer.name]',$s1 . $observer['xchan_name'] . $s2, $Text);
+		$Text = str_replace('[observer.address]',$s1 . $observer['xchan_addr'] . $s2, $Text);
+		$Text = str_replace('[observer.webname]',$s1 . substr($observer['xchan_addr'],0,strpos($observer['xchan_addr'],'@')) . $s2, $Text);
+		$Text = str_replace('[observer.photo]',$s1 . '[zmg]'.$observer['xchan_photo_l'].'[/zmg]' . $s2, $Text);				
 	} else {
 		$Text = str_replace('[observer.baseurl]', '', $Text);
 		$Text = str_replace('[observer.url]','', $Text);
plus

3

--- a/src/com/zillabyte/motherbrain/flow/buffer/mock/LocalBufferConsumer.java
+++ b/src/com/zillabyte/motherbrain/flow/buffer/mock/LocalBufferConsumer.java
@@ -3,6 +3,7 @@
 import java.io.Serializable;
 import java.util.Iterator;
 import java.util.LinkedList;
+import java.util.concurrent.LinkedBlockingQueue;
 
 import net.sf.json.JSONObject;
 
@@ -28,14 +29,9 @@
   private static final long serialVersionUID = 4433057004414450020L;
   private SourceFromBuffer _source;
   private String _topic;
-  private LinkedList<MapTuple> _messages = Lists.newLinkedList();
+  private LinkedBlockingQueue<MapTuple> _messages = new LinkedBlockingQueue<MapTuple>();
 
 
-  private final int NUM_MESSAGES = 20;
-  private int _messageNum = 0;
-  
-  
-
   public LocalBufferConsumer(SourceFromBuffer sourceOperation) throws OperationException{
     _source = sourceOperation;  
     _topic = _source.rawQuery();
@@ -71,28 +67,23 @@ public LocalBufferConsumer(SourceFromBuffer sourceOperation) throws OperationExc
 
   @Override
   public MapTuple getNextTuple() {
-    
-    if (_messageNum < NUM_MESSAGES){
-      return _messages.get(_messageNum++);
-    }
-    return null;
+    return _messages.poll();
   }
 
   @Override
   public boolean isEmitComplete() {
-    return _messageNum == NUM_MESSAGES;
+    return _messages.isEmpty();
   }
 
   @Override
   public JSONObject createSnapshot() {
-    JSONObject snapshot = new JSONObject();
-    snapshot.put("messageNum", _messageNum);
-    return snapshot;
+    // No need to snapshot in local mode
+    return null;
   }
 
   @Override
   public void applySnapshot(JSONObject snapshot) {
-    _messageNum = snapshot.getInt("messageNum");
+    // No need to snapshot in local mode
   }
 
 }
plus

211

--- a/tests/unit/tasks/server/express-server-test.js
+++ b/tests/unit/tasks/server/express-server-test.js
@@ -37,6 +37,19 @@ describe('express-server', function() {
     } catch(err) { }
   });
 
+  describe('processAppMiddlewares', function() {
+    it('has a good error message if a file exists, but does not export a function', function() {
+      subject.project = {
+        has:     function() { return true; },
+        require: function() { return {};   }
+      };
+
+      assert.throws(function() {
+        subject.processAppMiddlewares();
+      }, TypeError, 'ember-cli expected ./server/index.js to be the entry for your mock or proxy server');
+    });
+  });
+
   describe('output', function() {
     it('with proxy', function() {
       return subject.start({
plus

192

--- a/src/js/tabs/advanced.js
+++ b/src/js/tabs/advanced.js
@@ -20,8 +20,8 @@ AdvancedTab.prototype.generateHtml = function ()
 
 AdvancedTab.prototype.angular = function(module)
 {
-  module.controller('AdvancedCtrl', ['$scope', 'rpId', 'rpKeychain',
-                                    function ($scope, $id, $keychain)
+  module.controller('AdvancedCtrl', ['$scope', 'rpId', 'rpKeychain', 'rpNetwork',
+                                    function ($scope, $id, $keychain, $network)
   {
     // XRP currency object.
     // {name: "XRP - Ripples", order: 146, value: "XRP"}
@@ -69,9 +69,6 @@ AdvancedTab.prototype.angular = function(module)
 
       $scope.editBridge = false;
 
-      // Reload
-      location.reload();
-
       // Notify the user
       $scope.success.saveBridge = true;
     };
@@ -82,12 +79,12 @@ AdvancedTab.prototype.angular = function(module)
         $scope.options.max_tx_network_fee = ripple.Amount.from_human($scope.max_tx_network_fee_human).to_json();
         store.set('ripple_settings', JSON.stringify($scope.options));
       }
+      // This has to be updated manually because the network object is not
+      // recreated unless we do location.reload()
+      $network.remote.max_fee = $scope.options.max_tx_network_fee;
 
       $scope.editMaxNetworkFee = false;
 
-      // Reload
-      location.reload();
-
       // Notify the user
       $scope.success.saveMaxNetworkFee = true;
     };
@@ -106,9 +103,6 @@ AdvancedTab.prototype.angular = function(module)
 
       $scope.editAcctOptions = false;
 
-      // Reload
-      location.reload();
-
       // Notify the user
       $scope.success.saveAcctOptions = true;
     };
@@ -214,11 +208,13 @@ AdvancedTab.prototype.angular = function(module)
           store.set('ripple_settings', JSON.stringify($scope.options));
         }
 
-        // Reload
-        location.reload();
-
         // Notify the user
         $scope.success.saveServer = true;
+
+        // Reload
+        // A force reload is necessary here because we have to re-initialize
+        // the network object with the new server list.
+        location.reload();
       };
     }
   ]);
plus

26

--- a/library/src/main/java/com/cocosw/bottomsheet/BottomSheet.java
+++ b/library/src/main/java/com/cocosw/bottomsheet/BottomSheet.java
@@ -549,6 +549,7 @@ public Builder title(@StringRes int titleRes) {
 
         /**
          * Add a divider in to the list
+         * Be aware divider would not be shown in grid mode
          *
          * @return This Builder object to allow for chaining of calls to set methods
          */
plus

3

--- a/public/style/wireframe.css
+++ b/public/style/wireframe.css
@@ -5,12 +5,8 @@ html, body{
 
 
 #heading{
-<<<<<<< HEAD
 
     font-size: 28px;
-=======
-    font-size: 23px;
->>>>>>> f28144bfed20cf9fb1700ea968dc7ff987802dfb
     font-weight: bold;
     font-family: "Arial Rounded MT Bold", Arial, Helvetica, sans-serif;
 }
@@ -61,7 +57,7 @@ html, body{
 }
 
 .round-button span{
-    font-size: 23px;
+    font-size: 2.5vh;
     font-weight: bold;
     font-family: "Arial Rounded MT Bold", Arial, Helvetica, sans-serif;
     padding-top:40%;
@@ -71,11 +67,6 @@ html, body{
     text-shadow: none;
 }
 
-#arrow{
-  width: 8vw;
-  height: 8vh;
-  float: left;
-}
 
 .head a {
   margin-top:35px; 
plus

17

--- a/src/graphics/gpuparticles.cpp
+++ b/src/graphics/gpuparticles.cpp
@@ -131,16 +131,22 @@ void ParticleSystemProxy::generateParticlesFromPointEmitter(scene::IParticlePoin
     ParticleData* ParticleParamsTmp = (ParticleData *) realloc(ParticleParams, sizeof(ParticleData) * m_count);
     ParticleData* InitialValuesTmp = (ParticleData *)realloc(InitialValues, sizeof(ParticleData)* m_count);
 
-    if(ParticleParamsTmp != NULL)     // In case memory allocation succeeded
+    if (ParticleParamsTmp != NULL)     // In case memory allocation succeeded
     {
-        Log::error("GPUParticles", "Not enough memory for %d from point particles.", m_count);
         ParticleParams = ParticleParamsTmp;
+    }
+    else
+    {
+        Log::error("GPUParticles", "Not enough memory for %d from point particles.", m_count);
         m_count = m_previous_count;
     }
-    if(InitialValuesTmp != NULL)
+    if (InitialValuesTmp != NULL)
     {
-        Log::fatal("GPUParticles", "Not enough memory for %d from point particles.", m_count);
         InitialValues = InitialValuesTmp;
+    }
+    else
+    {
+        Log::fatal("GPUParticles", "Not enough memory for %d from point particles.", m_count);
         m_count = m_previous_count;
     }
 
@@ -166,17 +172,23 @@ void ParticleSystemProxy::generateParticlesFromBoxEmitter(scene::IParticleBoxEmi
     ParticleData* ParticleParamsTmp = (ParticleData *) realloc(ParticleParams, sizeof(ParticleData) * m_count);
     ParticleData* InitialValuesTmp = (ParticleData *)realloc(InitialValues, sizeof(ParticleData)* m_count);
 
-    if(ParticleParamsTmp != NULL)     // In case memory allocation succeeded
+    if (ParticleParamsTmp != NULL)     // In case memory allocation succeeded
     {
-        Log::error("GPUParticles", "Not enough memory for %d from box particles.", m_count);
         ParticleParams = ParticleParamsTmp;
-        m_count        = m_previous_count;
     }
-    if(InitialValuesTmp != NULL)
+    else
     {
         Log::error("GPUParticles", "Not enough memory for %d from box particles.", m_count);
+        m_count = m_previous_count;
+    }
+    if (InitialValuesTmp != NULL)
+    {
         InitialValues = InitialValuesTmp;
-        m_count       = m_previous_count;
+    }
+    else
+    {
+        Log::error("GPUParticles", "Not enough memory for %d from box particles.", m_count);
+        m_count = m_previous_count;
     }
 
     const core::vector3df& extent = emitter->getBox().getExtent();
plus

4

--- a/Classes/View/Layer/PrePlayLayer.h
+++ b/Classes/View/Layer/PrePlayLayer.h
@@ -16,7 +16,7 @@ class PrePlayLayer : public Layer
 
 	virtual bool init() override;
 
-	void start(Object* object, ui::TouchEventType type);
+	void start(Ref* object, ui::TouchEventType type);
 	void onResume(Ref* obj);
 	void onNextRound(Ref* obj);
 private:
plus

9

--- a/lib/refinery/i18n/engine.rb
+++ b/lib/refinery/i18n/engine.rb
@@ -34,7 +34,7 @@ def find_or_set_locale
             else
               ::I18n.locale = ::Refinery::I18n.default_frontend_locale
             end
-            Thread.current[:globalize_locale] = ::I18n.locale
+            Globalize.locale = ::I18n.locale
           end
 
           prepend_before_filter :find_or_set_locale
@@ -54,13 +54,13 @@ def find_or_set_locale
           def globalize!
             if ::Refinery::I18n.frontend_locales.any?
               if params[:switch_locale]
-                Thread.current[:globalize_locale] = params[:switch_locale].to_sym
+                Globalize.locale = params[:switch_locale].to_sym
               elsif ::I18n.locale != ::Refinery::I18n.default_frontend_locale
-                Thread.current[:globalize_locale] = ::Refinery::I18n.default_frontend_locale
+                Globalize.locale = ::Refinery::I18n.default_frontend_locale
               end
             end
 
-            Thread.current[:globalize_locale] = ::I18n.locale if Thread.current[:globalize_locale].nil?
+            Globalize.locale = ::I18n.locale if Globalize.locale.nil?
           end
           # globalize! should be prepended first so that it runs after find_or_set_locale
           prepend_before_filter :globalize!, :find_or_set_locale
plus

19

--- a/parse.c
+++ b/parse.c
@@ -569,7 +569,7 @@ struct getLangCtx {
     boolean     err;
 };
 
-#define FOPEN_GLC_IF_NECESSARY(_glc_, _label_) do {         \
+#define GLC_FOPEN_IF_NECESSARY(_glc_, _label_) do {         \
     if (!(_glc_)->input) {                                  \
         (_glc_)->input = fopen((_glc_)->fileName, "rb");    \
         if (!(_glc_)->input) {                              \
@@ -579,6 +579,13 @@ struct getLangCtx {
     }                                                       \
 } while (0)                                                 \
 
+#define GLC_FCLOSE(_glc_) do {                              \
+    if ((_glc_)->input) {                                   \
+        fclose((_glc_)->input);                             \
+        (_glc_)->input = NULL;                              \
+    }                                                       \
+} while (0)
+
 static langType getSpecLanguageCommon (const char *const spec, struct getLangCtx *glc,
 				       unsigned int nominate (const char *const, parserCandidate**))
 {
@@ -588,7 +595,7 @@ static langType getSpecLanguageCommon (const char *const spec, struct getLangCtx
 
 	n_candidates = (*nominate)(spec, &candidates);
 
-    if (n_candidates == 1)
+	if (n_candidates == 1)
 	{
 		verbose ("		#candidates: %u\n", n_candidates);
 		language = candidates[0].lang;
@@ -596,7 +603,7 @@ static langType getSpecLanguageCommon (const char *const spec, struct getLangCtx
 	else if (n_candidates > 1)
 	{
 		verbose ("		#candidates: %u\n", n_candidates);
-        FOPEN_GLC_IF_NECESSARY(glc, fopen_error);
+        GLC_FOPEN_IF_NECESSARY(glc, fopen_error);
 		language = getTwoGramLanguage(glc->input, candidates, n_candidates);
 		if (language == LANG_IGNORE)
 			language = candidates[0].lang;
@@ -606,10 +613,10 @@ static langType getSpecLanguageCommon (const char *const spec, struct getLangCtx
         Assert(language != LANG_IGNORE && language != LANG_AUTO);
 	}
 	else
-    {
+	{
 fopen_error:
 		language = LANG_IGNORE;
-    }
+	}
 
 	eFree(candidates);
 	candidates = NULL;
@@ -701,7 +708,7 @@ getFileLanguageInternal (const char *const fileName)
         if (templateBaseName)
         {
             verbose ("	pattern + template(%s): %s\n", tExt, templateBaseName);
-            FOPEN_GLC_IF_NECESSARY(&glc, cleanup);
+            GLC_FOPEN_IF_NECESSARY(&glc, cleanup);
             rewind(glc.input);
             language = getPatternLanguage(templateBaseName, &glc);
             if (language != LANG_IGNORE)
@@ -709,12 +716,11 @@ getFileLanguageInternal (const char *const fileName)
         }
     }
 
-    FOPEN_GLC_IF_NECESSARY(&glc, cleanup);
+    GLC_FOPEN_IF_NECESSARY(&glc, cleanup);
     language = tasteLanguage(&glc);
 
   cleanup:
-    if (glc.input)
-        fclose (glc.input);
+    GLC_FCLOSE(&glc);
     if (templateBaseName)
         eFree (templateBaseName);
 	return language;
plus

3

--- a/llvm/lib/IR/Constants.cpp
+++ b/llvm/lib/IR/Constants.cpp
@@ -1330,12 +1330,12 @@ bool ConstantFP::isValueValidForType(Type *Ty, const APFloat& Val) {
 ConstantAggregateZero *ConstantAggregateZero::get(Type *Ty) {
   assert((Ty->isStructTy() || Ty->isArrayTy() || Ty->isVectorTy()) &&
          "Cannot create an aggregate zero of non-aggregate type!");
-  
-  ConstantAggregateZero *&Entry = Ty->getContext().pImpl->CAZConstants[Ty];
+
+  auto &Entry = Ty->getContext().pImpl->CAZConstants[Ty];
   if (!Entry)
-    Entry = new ConstantAggregateZero(Ty);
+    Entry.reset(new ConstantAggregateZero(Ty));
 
-  return Entry;
+  return Entry.get();
 }
 
 /// destroyConstant - Remove the constant from the constant table.
plus

3

--- a/lib/IR/Constants.cpp
+++ b/lib/IR/Constants.cpp
@@ -1330,12 +1330,12 @@ bool ConstantFP::isValueValidForType(Type *Ty, const APFloat& Val) {
 ConstantAggregateZero *ConstantAggregateZero::get(Type *Ty) {
   assert((Ty->isStructTy() || Ty->isArrayTy() || Ty->isVectorTy()) &&
          "Cannot create an aggregate zero of non-aggregate type!");
-  
-  ConstantAggregateZero *&Entry = Ty->getContext().pImpl->CAZConstants[Ty];
+
+  auto &Entry = Ty->getContext().pImpl->CAZConstants[Ty];
   if (!Entry)
-    Entry = new ConstantAggregateZero(Ty);
+    Entry.reset(new ConstantAggregateZero(Ty));
 
-  return Entry;
+  return Entry.get();
 }
 
 /// destroyConstant - Remove the constant from the constant table.
plus

345

--- a/apps/system/test/marionette/rocketbar_activity_layout_test.js
+++ b/apps/system/test/marionette/rocketbar_activity_layout_test.js
@@ -59,6 +59,13 @@ marionette('Rocketbar - Opened Activity From Search', function() {
     actions.longPress(result, 1).perform();
     client.switchToFrame();
 
+    // Bug 1104314 - On v2.1 b2g-desktop, the search app has a bug where
+    // the keyboard does not dismiss when long pressing a bookmark. Since
+    // this does not reprodue on device or master, we work around it here.
+    client.executeScript(function() {
+      window.wrappedJSObject.KeyboardManager.hideKeyboardImmediately();
+    });
+
     client.helper.waitForElement('#search .contextmenu-list button').click();
     client.switchToFrame(bookmark.currentTabFrame);
     bookmark.bookmarkTitle.click();
plus

8

--- a/gosu-core-api/src/main/java/gw/lang/reflect/MethodScorer.java
+++ b/gosu-core-api/src/main/java/gw/lang/reflect/MethodScorer.java
@@ -184,6 +184,7 @@ private boolean arePrimitiveTypesCompatible( IType paramType, IType argType ) {
     return StandardCoercionManager.arePrimitiveTypesAssignable( paramType, argType ) ||
            (paramType.isPrimitive() && argType.isPrimitive() &&
             (paramType != JavaTypes.pBOOLEAN()) && (argType != JavaTypes.pBOOLEAN()) &&
+            (paramType != JavaTypes.pCHAR()) && (argType != JavaTypes.pCHAR()) &&
             (paramType != JavaTypes.pVOID()) && (argType != JavaTypes.pVOID()) &&
            BasePrimitiveCoercer.losesInformation( argType, paramType ) <= 1);
   }
plus

3

--- a/Source/cocos2d/AppDelegate.cpp
+++ b/Source/cocos2d/AppDelegate.cpp
@@ -14,7 +14,7 @@ class AppDelegate::impl
 	impl(){};
 	~impl(){};
 
-	BWGameModel m_game_model;
+	std::unique_ptr<BWGameModel> m_game_model{};
 	BWGameController m_game_controller;
 };
 
@@ -40,10 +40,10 @@ bool AppDelegate::applicationDidFinishLaunching() {
 	BasicDataLoader::getInstance().init();
 	ResourceLoader::getInstance().init();
 
-	pimpl->m_game_model.init();
-	pimpl->m_game_controller.init(&(pimpl->m_game_model));
-	pimpl->m_game_model.getTacticsMap()->resize(20, 30);
-	pimpl->m_game_model.getTacticsMap()->random();
+	pimpl->m_game_model = std::make_unique<BWGameModel>();
+	pimpl->m_game_controller.init(pimpl->m_game_model.get());
+	pimpl->m_game_model->getTacticsMap()->resize(20, 30);
+	pimpl->m_game_model->getTacticsMap()->random();
 
 	// turn on display FPS
 	director->setDisplayStats(true);