Skip to content
This repository was archived by the owner on Jul 22, 2025. It is now read-only.

Commit 2346729

Browse files
authored
Merge pull request #41 from inteltiger/fix-compiler-warning
fix duplicated return and other warnings reported by compiler
2 parents 0368df1 + 5000657 commit 2346729

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed

src/360SCVP/360SCVPBitstream.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -512,8 +512,6 @@ uint32_t gts_bs_write_data(GTS_BitStream *bs, const int8_t *data, uint32_t nbByt
512512
}
513513
memcpy_s(bs->buffer_io+bs->buffer_written, nbBytes, data, nbBytes);
514514
bs->buffer_written += nbBytes;
515-
return nbBytes;
516-
517515
if (gts_fwrite(data, nbBytes, 1, bs->stream) != 1) return 0;
518516
if (bs->size == bs->position) bs->size += nbBytes;
519517
bs->position += nbBytes;

src/360SCVP/360SCVPGeometry.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ struct SPos
6262
POSType x;
6363
POSType y;
6464
POSType z;
65-
SPos() : faceIdx(0), x(0), y(0), z(0) {};
66-
SPos(int32_t f, POSType xIn, POSType yIn, POSType zIn ) : faceIdx(f), x(xIn), y(yIn), z(zIn) {};
65+
SPos() : faceIdx(0), x(0), y(0), z(0) {}
66+
SPos(int32_t f, POSType xIn, POSType yIn, POSType zIn ) : faceIdx(f), x(xIn), y(yIn), z(zIn) {}
6767
};
6868

6969
struct GeometryRotation
@@ -76,7 +76,7 @@ struct ViewPortSettings
7676
float vFOV;
7777
float fYaw; //
7878
float fPitch;
79-
ViewPortSettings() : hFOV(0), vFOV(0), fYaw(0), fPitch(0) {};
79+
ViewPortSettings() : hFOV(0), vFOV(0), fYaw(0), fPitch(0) {}
8080
};
8181

8282
struct SVideoInfo
@@ -101,7 +101,7 @@ class Geometry
101101
bool m_bPadded;
102102
bool m_bGeometryMapping;
103103
bool m_bConvOutputPaddingNeeded;
104-
inline int32_t round(POSType t) { return (int32_t)(t+ (t>=0? 0.5 :-0.5)); };
104+
inline int32_t round(POSType t) { return (int32_t)(t+ (t>=0? 0.5 :-0.5)); }
105105
void rotate3D(SPos& sPos, int32_t rx, int32_t ry, int32_t rz);
106106
public:
107107
int32_t m_numFaces;
@@ -111,7 +111,7 @@ class Geometry
111111
virtual ~Geometry();
112112
void geoInit(SVideoInfo& sVideoInfo);
113113
void geoUnInit(); // just use in the viewport
114-
GeometryType getType() { return (GeometryType)m_sVideoInfo.geoType; };
114+
GeometryType getType() { return (GeometryType)m_sVideoInfo.geoType; }
115115
void setPaddingFlag(bool bFlag) { m_bPadded = bFlag; }
116116
virtual void map2DTo3D(SPos& IPosIn, SPos *pSPosOut) = 0;
117117
virtual void map3DTo2D(SPos *pSPosIn, SPos *pSPosOut) = 0;

src/360SCVP/360SCVPViewportImpl.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,8 @@ class TgenViewport
101101
UsageType m_usageType;
102102
Param_VideoFPStruct m_paramVideoFP;
103103

104-
inline int32_t round(POSType t) { return (int32_t)(t+ (t>=0? 0.5 :-0.5)); };
104+
inline int32_t round(POSType t) { return (int32_t)(t+ (t>=0? 0.5 :-0.5)); }
105+
105106
public:
106107
TgenViewport();
107108
virtual ~TgenViewport();

0 commit comments

Comments
 (0)