Cleanup: Add more const correctness to some functions

These are functions that are used by eevee-rewrite which has more strict
const correctness.
This commit is contained in:
2022-01-27 14:59:09 +01:00
parent 78f29c0467
commit 6f1ab97c53
8 changed files with 18 additions and 14 deletions

View File

@@ -46,7 +46,7 @@ void *BKE_camera_add(struct Main *bmain, const char *name);
/**
* Get the camera's DOF value, takes the DOF object into account.
*/
float BKE_camera_object_dof_distance(struct Object *ob);
float BKE_camera_object_dof_distance(const struct Object *ob);
int BKE_camera_sensor_fit(int sensor_fit, float sizex, float sizey);
float BKE_camera_sensor_size(int sensor_fit, float sensor_x, float sensor_y);

View File

@@ -218,7 +218,7 @@ void *BKE_camera_add(Main *bmain, const char *name)
return cam;
}
float BKE_camera_object_dof_distance(Object *ob)
float BKE_camera_object_dof_distance(const Object *ob)
{
Camera *cam = (Camera *)ob->data;
if (ob->type != OB_CAMERA) {