[英]Expression result unused
我有一些代碼,我正在嘗試修復一些編譯錯誤:
StkFrames& PRCRev :: tick( StkFrames& frames, unsigned int channel )
{
#if defined(_STK_DEBUG_)
if ( channel >= frames.channels() - 1 ) {
errorString_ << "PRCRev::tick(): channel and StkFrames arguments are incompatible!";
handleError( StkError::FUNCTION_ARGUMENT );
}
#endif
StkFloat *samples = &frames[channel];
unsigned int hop = frames.channels();
for ( unsigned int i=0; i<frames.frames(); i++, samples += hop ) {
*samples = tick( *samples );
*samples++; <<<<<<<<<--------- Expression result unused.
*samples = lastFrame_[1];
}
return frames;
}
我不明白這些代碼正在嘗試做什么。 代碼很大,我修復了很多。 但是,谷歌搜索對此不起作用。
有任何想法嗎?
首先,您進行增量操作(實際上會向您發出警告的行)。
*samples++;
然后,您為該變量分配其他內容,從而使先前的操作未使用。
*samples = lastFrame_[1];
我建議您更仔細地在“ for”循環中閱讀此代碼。 看起來不太合邏輯。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.