diff options
author | Jeroen Bakker <jeroen@blender.org> | 2021-10-11 10:40:22 +0300 |
---|---|---|
committer | Jeroen Bakker <jeroen@blender.org> | 2021-10-11 10:40:22 +0300 |
commit | a282efecbc1487fdb3156fb829ea3170c39e14a7 (patch) | |
tree | 86406efbee1c455c614182cbc45d80fd1d2928b8 /source/blender/blenkernel/intern | |
parent | bdd2a7f46646e266bfa7d926fbbffbf938c781fc (diff) |
Cleanup: Add const keyword to `BKE_packedfile_id_check`.
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r-- | source/blender/blenkernel/intern/image.c | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/packedFile.c | 12 |
2 files changed, 7 insertions, 7 deletions
diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c index 2a0f8a597d1..5ae338aaaeb 100644 --- a/source/blender/blenkernel/intern/image.c +++ b/source/blender/blenkernel/intern/image.c @@ -5749,7 +5749,7 @@ bool BKE_image_has_anim(Image *ima) return (BLI_listbase_is_empty(&ima->anims) == false); } -bool BKE_image_has_packedfile(Image *ima) +bool BKE_image_has_packedfile(const Image *ima) { return (BLI_listbase_is_empty(&ima->packedfiles) == false); } diff --git a/source/blender/blenkernel/intern/packedFile.c b/source/blender/blenkernel/intern/packedFile.c index 95763b0da54..f0f8343420d 100644 --- a/source/blender/blenkernel/intern/packedFile.c +++ b/source/blender/blenkernel/intern/packedFile.c @@ -805,27 +805,27 @@ void BKE_packedfile_unpack_all(Main *bmain, ReportList *reports, enum ePF_FileSt } /* ID should be not NULL, return 1 if there's a packed file */ -bool BKE_packedfile_id_check(ID *id) +bool BKE_packedfile_id_check(const ID *id) { switch (GS(id->name)) { case ID_IM: { - Image *ima = (Image *)id; + const Image *ima = (const Image *)id; return BKE_image_has_packedfile(ima); } case ID_VF: { - VFont *vf = (VFont *)id; + const VFont *vf = (const VFont *)id; return vf->packedfile != NULL; } case ID_SO: { - bSound *snd = (bSound *)id; + const bSound *snd = (const bSound *)id; return snd->packedfile != NULL; } case ID_VO: { - Volume *volume = (Volume *)id; + const Volume *volume = (const Volume *)id; return volume->packedfile != NULL; } case ID_LI: { - Library *li = (Library *)id; + const Library *li = (const Library *)id; return li->packedfile != NULL; } default: |