]> source.dussan.org Git - poi.git/commitdiff
more int narrowing
authorPJ Fanning <fanningpj@apache.org>
Fri, 19 Aug 2022 09:31:14 +0000 (09:31 +0000)
committerPJ Fanning <fanningpj@apache.org>
Fri, 19 Aug 2022 09:31:14 +0000 (09:31 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903562 13f79535-47bb-0310-9956-ffa450edef68

poi-scratchpad/src/main/java/org/apache/poi/hslf/record/NotesAtom.java
poi-scratchpad/src/main/java/org/apache/poi/hslf/record/SlideAtom.java

index 82ab6d13de7167cb24124f5c778c05d51acb68f0..b4239d4fdd46056204e83cd66fa4672e839b8e9c 100644 (file)
@@ -98,9 +98,9 @@ public final class NotesAtom extends RecordAtom {
 
         // Flags
         short flags = 0;
-        if(followMasterObjects)    { flags += 1; }
-        if(followMasterScheme)     { flags += 2; }
-        if(followMasterBackground) { flags += 4; }
+        if(followMasterObjects)    { flags += (short) 1; }
+        if(followMasterScheme)     { flags += (short) 2; }
+        if(followMasterBackground) { flags += (short) 4; }
         writeLittleEndian(flags,out);
 
         // Reserved fields
index 605539b8d2a6fff703a5a3f109b3be031fbd36e9..42fa25e1c9e2e388612ee6cf7bcd14e229347de7 100644 (file)
@@ -143,15 +143,15 @@ public final class SlideAtom extends RecordAtom {
         layoutAtom.writeOut(out);
 
         // IDs
-        writeLittleEndian(masterID,out);
-        writeLittleEndian(notesID,out);
+        writeLittleEndian(masterID, out);
+        writeLittleEndian(notesID, out);
 
         // Flags
         short flags = 0;
-        if(followMasterObjects)    { flags += 1; }
-        if(followMasterScheme)     { flags += 2; }
-        if(followMasterBackground) { flags += 4; }
-        writeLittleEndian(flags,out);
+        if(followMasterObjects)    { flags += (short) 1; }
+        if(followMasterScheme)     { flags += (short) 2; }
+        if(followMasterBackground) { flags += (short) 4; }
+        writeLittleEndian(flags, out);
 
         // Reserved data
         out.write(reserved);