Daniele Bartolini 10 年之前
父節點
當前提交
16c61d20a9
共有 3 個文件被更改,包括 5 次插入4 次删除
  1. 3 3
      src/device.cpp
  2. 1 0
      src/device.h
  3. 1 1
      src/device_options.cpp

+ 3 - 3
src/device.cpp

@@ -122,9 +122,6 @@ private:
 Device::Device(const DeviceOptions& opts)
 	: _allocator(default_allocator(), MAX_SUBSYSTEMS_HEAP)
 	, _device_options(opts)
-	, _boot_package_id(uint64_t(0))
-	, _boot_script_id(uint64_t(0))
-	, _boot_package(NULL)
 	, _bundle_filesystem(NULL)
 	, _resource_loader(NULL)
 	, _resource_manager(NULL)
@@ -135,6 +132,9 @@ Device::Device(const DeviceOptions& opts)
 	, _input_manager(NULL)
 	, _unit_manager(NULL)
 	, _lua_environment(NULL)
+	, _boot_package_id(uint64_t(0))
+	, _boot_script_id(uint64_t(0))
+	, _boot_package(NULL)
 	, _worlds(default_allocator())
 	, _width(0)
 	, _height(0)

+ 1 - 0
src/device.h

@@ -47,6 +47,7 @@ class Device
 	InputManager* _input_manager;
 	UnitManager* _unit_manager;
 	LuaEnvironment* _lua_environment;
+
 	StringId64 _boot_package_id;
 	StringId64 _boot_script_id;
 	ResourcePackage* _boot_package;

+ 1 - 1
src/device_options.cpp

@@ -107,7 +107,7 @@ int DeviceOptions::parse()
 
 	_do_compile = cl.has_argument("compile");
 	_platform = cl.get_parameter("platform");
-	if (_do_compile != NULL && _platform == NULL)
+	if (_do_compile && _platform == NULL)
 	{
 		help("Platform must be specified.");
 		return EXIT_FAILURE;