Minor clean up: msvc warnings/include order/comment text.
Change-Id: I2b54abcb9f535715d8713930942447c0b0f5f862
This commit is contained in:
14
sample.cpp
14
sample.cpp
@@ -6,20 +6,16 @@
|
|||||||
// in the file PATENTS. All contributing project authors may
|
// in the file PATENTS. All contributing project authors may
|
||||||
// be found in the AUTHORS file in the root of the source tree.
|
// be found in the AUTHORS file in the root of the source tree.
|
||||||
//
|
//
|
||||||
// This sample application demonstrates how to use the matroska parser
|
// This sample application demonstrates how to use the Matroska parser
|
||||||
// library, which allows clients to handle a matroska format file.
|
// library, which allows clients to handle a Matroska format file.
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
#include "mkvreader.hpp"
|
#include "mkvreader.hpp"
|
||||||
#include "mkvparser.hpp"
|
#include "mkvparser.hpp"
|
||||||
#include <memory>
|
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
// Silences these warnings:
|
// Disable MSVC warnings that suggest making code non-portable.
|
||||||
// warning C4996: 'mbstowcs': This function or variable may be unsafe. Consider
|
|
||||||
// using mbstowcs_s instead. To disable deprecation, use
|
|
||||||
// _CRT_SECURE_NO_WARNINGS. See online help for details.
|
|
||||||
// Fixing this warning requires use of a function available only on Windows,
|
|
||||||
// and this sample code must support non-windows platforms.
|
|
||||||
#pragma warning(disable:4996)
|
#pragma warning(disable:4996)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -26,6 +26,7 @@
|
|||||||
using mkvmuxer::uint64;
|
using mkvmuxer::uint64;
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
|
// Disable MSVC warnings that suggest making code non-portable.
|
||||||
#pragma warning(disable:4996)
|
#pragma warning(disable:4996)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -8,6 +8,11 @@
|
|||||||
|
|
||||||
#include "./vttreader.h" // NOLINT
|
#include "./vttreader.h" // NOLINT
|
||||||
|
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
// Disable MSVC warnings that suggest making code non-portable.
|
||||||
|
#pragma warning(disable:4996)
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace libwebvtt {
|
namespace libwebvtt {
|
||||||
|
|
||||||
VttReader::VttReader() : file_(NULL) {
|
VttReader::VttReader() : file_(NULL) {
|
||||||
|
|||||||
@@ -686,8 +686,8 @@ Time& Time::presentation(presentation_t d) {
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
seconds = d / 1000;
|
seconds = static_cast<int>(d / 1000);
|
||||||
milliseconds = d - 1000 * seconds;
|
milliseconds = static_cast<int>(d - 1000 * seconds);
|
||||||
|
|
||||||
minutes = seconds / 60;
|
minutes = seconds / 60;
|
||||||
seconds -= 60 * minutes;
|
seconds -= 60 * minutes;
|
||||||
|
|||||||
Reference in New Issue
Block a user