Daniele Bartolini 10 лет назад
Родитель
Сommit
aa8b6e7e6c
2 измененных файлов с 5 добавлено и 5 удалено
  1. 2 2
      src/device.cpp
  2. 3 3
      src/device.h

+ 2 - 2
src/device.cpp

@@ -38,7 +38,7 @@
 namespace crown
 {
 
-Device::Device(DeviceOptions& opts)
+Device::Device(const DeviceOptions& opts)
 	: _allocator(default_allocator(), MAX_SUBSYSTEMS_HEAP)
 	, _width(0)
 	, _height(0)
@@ -443,7 +443,7 @@ void Device::read_config()
 char _buffer[sizeof(Device)];
 Device* _device = NULL;
 
-void init(DeviceOptions& opts)
+void init(const DeviceOptions& opts)
 {
 	CE_ASSERT(_device == NULL, "Crown already initialized");
 	_device = new (_buffer) Device(opts);

+ 3 - 3
src/device.h

@@ -35,7 +35,7 @@ namespace crown
 /// @ingroup Device
 struct Device
 {
-	Device(DeviceOptions& opts);
+	Device(const DeviceOptions& opts);
 
 	void init();
 
@@ -136,7 +136,7 @@ private:
 	float _last_delta_time;
 	double _time_since_start;
 
-	DeviceOptions& _device_options;
+	const DeviceOptions& _device_options;
 	Filesystem* _bundle_filesystem;
 	StringId64 _boot_package_id;
 	StringId64 _boot_script_id;
@@ -235,7 +235,7 @@ private:
 };
 
 bool next_event(OsEvent& ev);
-void init(DeviceOptions& opts);
+void init(const DeviceOptions& opts);
 void update();
 void shutdown();
 Device* device();