mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-05-02 00:44:43 -05:00
Code review changes
This commit is contained in:
@@ -26,8 +26,8 @@
|
||||
|
||||
#include "profile/line.h"
|
||||
#include "profile/scriptlogdialog.h"
|
||||
#include <ghoul/misc/stringhelper.h>
|
||||
#include <openspace/scene/profile.h>
|
||||
#include <ghoul/misc/stringhelper.h>
|
||||
#include <QDialogButtonBox>
|
||||
#include <QHBoxLayout>
|
||||
#include <QLabel>
|
||||
|
||||
@@ -412,8 +412,8 @@ bool SessionRecording::startPlayback(std::string& filename,
|
||||
}
|
||||
// throwaway newline character(s)
|
||||
std::string lineEnd = readHeaderElement(_playbackFile, 1);
|
||||
bool isDosLineEnding = (lineEnd == "\r");
|
||||
if (isDosLineEnding) {
|
||||
bool hasDosLineEnding = (lineEnd == "\r");
|
||||
if (hasDosLineEnding) {
|
||||
// throwaway the second newline character (\n) also
|
||||
readHeaderElement(_playbackFile, 1);
|
||||
}
|
||||
@@ -424,8 +424,7 @@ bool SessionRecording::startPlayback(std::string& filename,
|
||||
_playbackFile.close();
|
||||
_playbackFile.open(_playbackFilename, std::ifstream::in | std::ios::binary);
|
||||
size_t headerSize = FileHeaderTitle.length() + FileHeaderVersionLength
|
||||
+ sizeof(DataFormatBinaryTag) + sizeof('\n')
|
||||
+ ((isDosLineEnding) ? sizeof('\r') : 0);
|
||||
+ sizeof(DataFormatBinaryTag) + sizeof('\n');
|
||||
std::vector<char> hBuffer;
|
||||
hBuffer.resize(headerSize);
|
||||
_playbackFile.read(hBuffer.data(), headerSize);
|
||||
|
||||
@@ -348,7 +348,7 @@ def check_for_std_getline(lines):
|
||||
index = [i for i,s in enumerate(lines)
|
||||
if 'std::getline' in s]
|
||||
if len(index) > 0:
|
||||
return 'File used wrong glm include. Use "#include <ghoul/glm.h>" instead'
|
||||
return 'File used wrong std::getline function. Use ghoul::getline from "ghoul/misc/stringhelper.h" instead'
|
||||
else:
|
||||
return ''
|
||||
|
||||
|
||||
Reference in New Issue
Block a user