prompt stringlengths 219 3.5k | completion stringlengths 96 1.37k | file_path stringlengths 5 168 | lang stringclasses 7
values | commit stringlengths 40 40 | text stringlengths 316 4.54k |
|---|---|---|---|---|---|
<|file_sep|>src/utils/mapped_file.cpp.diff
original:
updated:
#include <exception/elf.h>
<|file_sep|>original/src/utils/mapped_file.cpp
int fd;
struct stat buf;
char* begin;
if ((fd = open(get_path(), O_RDONLY)) == -1)
throw sasm::exception::os("open", get_path());
if (fstat(fd, &buf) == -1)
throw sasm::exception::os("fstat");
if ((begin = (char*) mmap(NULL, buf.st_size, PROT_READ, MAP_PRIVATE, fd, 0)) == MAP_FAILED)
throw sasm::exception::os("mmap");
close(fd);
_is_mapped = true;
_begin = begin;
_size = buf.st_size;
}
void mapped_file::unmap()
<|file_sep|>current/src/utils/mapped_file.cpp
{
int fd;
struct stat buf;
char* begin;
if ((fd = open(get_path(), O_RDONLY)) == -1)
throw sasm::exception::os("open", get_path());
if (fstat(fd, &buf) == -1)
throw sasm::exception::os("fstat");
if ((begin = (char*) mmap(NULL, buf.st_size, PROT_READ, MAP_PRIVATE, fd, 0)) == MAP_FAILED)
throw sasm::exception::os("mmap");
close(fd);
_is_mapped = true;
_begin = begin;
_size = buf.st_size;
}
<|file_sep|>updated/src/utils/mapped_file.cpp | int fd;
struct stat buf;
char* begin;
if ((fd = open(get_path(), O_RDONLY)) == -1)
throw sasm::exception::os("open", get_path());
if (fstat(fd, &buf) == -1)
throw sasm::exception::os("fstat");
if (buf.st_size == 0)
throw sasm::exception::elf(_path.c_str(), "invalid ELF file");
if ((begin = (char*) mmap(NULL, buf.st_size, PROT_READ, MAP_PRIVATE, fd, 0)) == MAP_FAILED)
throw sasm::exception::os("mmap");
close(fd);
_is_mapped = true;
_begin = begin;
_size = buf.st_size; | src/utils/mapped_file.cpp | C++ | c91029f2fd832db64d88ce996a42ac52616ec07d | <|file_sep|>src/utils/mapped_file.cpp.diff
original:
updated:
#include <exception/elf.h>
<|file_sep|>original/src/utils/mapped_file.cpp
int fd;
struct stat buf;
char* begin;
if ((fd = open(get_path(), O_RDONLY)) == -1)
throw sasm::exception::os("open", get_path());
if (fstat(fd, &buf) == -1)
throw sasm::exception::os("fstat");
if ((begin = (char*) mmap(NULL, buf.st_size, PROT_READ, MAP_PRIVATE, fd, 0)) == MAP_FAILED)
throw sasm::exception::os("mmap");
close(fd);
_is_mapped = true;
_begin = begin;
_size = buf.st_size;
}
void mapped_file::unmap()
<|file_sep|>current/src/utils/mapped_file.cpp
{
int fd;
struct stat buf;
char* begin;
if ((fd = open(get_path(), O_RDONLY)) == -1)
throw sasm::exception::os("open", get_path());
if (fstat(fd, &buf) == -1)
throw sasm::exception::os("fstat");
if ((begin = (char*) mmap(NULL, buf.st_size, PROT_READ, MAP_PRIVATE, fd, 0)) == MAP_FAILED)
throw sasm::exception::os("mmap");
close(fd);
_is_mapped = true;
_begin = begin;
_size = buf.st_size;
}
<|file_sep|>updated/src/utils/mapped_file.cpp
int fd;
struct stat buf;
char* begin;
if ((fd = open(get_path(), O_RDONLY)) == -1)
throw sasm::exception::os("open", get_path());
if (fstat(fd, &buf) == -1)
throw sasm::exception::os("fstat");
if (buf.st_size == 0)
throw sasm::exception::elf(_path.c_str(), "invalid ELF file");
if ((begin = (char*) mmap(NULL, buf.st_size, PROT_READ, MAP_PRIVATE, fd, 0)) == MAP_FAILED)
throw sasm::exception::os("mmap");
close(fd);
_is_mapped = true;
_begin = begin;
_size = buf.st_size; |
<|file_sep|>test/iterator_concepts_ordering.cpp.diff
original:
updated:
BOOST_MPL_ASSERT((duck::is_more_specific_than<
duck::ForwardIterator,
duck::RandomAccessIterator>));
<|file_sep|>original/test/iterator_concepts_ordering.cpp
BOOST_MPL_ASSERT((duck::is_more_specific_than<
duck::BidirectionalIterator,
duck::RandomAccessIterator>));
BOOST_MPL_ASSERT((duck::is_more_specific_than<
duck::IncrementableIterator,
duck::RandomAccessIterator>));
BOOST_MPL_ASSERT_NOT((duck::is_more_specific_than<
duck::RandomAccessIterator,
duck::BidirectionalIterator>));
BOOST_MPL_ASSERT_NOT((duck::is_more_specific_than<
duck::RandomAccessIterator,
duck::IncrementableIterator>));
BOOST_MPL_ASSERT_NOT((duck::is_more_specific_than<
duck::ForwardIterator,
duck::ForwardIterator>));
<|file_sep|>current/test/iterator_concepts_ordering.cpp
BOOST_MPL_ASSERT((duck::is_more_specific_than<
duck::IncrementableIterator,
duck::RandomAccessIterator>));
BOOST_MPL_ASSERT((duck::is_more_specific_than<
duck::ForwardIterator,
duck::RandomAccessIterator>));
BOOST_MPL_ASSERT_NOT((duck::is_more_specific_than<
duck::RandomAccessIterator,
duck::BidirectionalIterator>));
BOOST_MPL_ASSERT_NOT((duck::is_more_specific_than<
duck::RandomAccessIterator,
duck::IncrementableIterator>));
BOOST_MPL_ASSERT_NOT((duck::is_more_specific_than<
duck::ForwardIterator,
duck::ForwardIterator>));
<|file_sep|>updated/test/iterator_concepts_ordering.cpp |
BOOST_MPL_ASSERT((duck::is_more_specific_than<
duck::ForwardIterator,
duck::RandomAccessIterator>));
BOOST_MPL_ASSERT_NOT((duck::is_more_specific_than<
duck::RandomAccessIterator,
duck::BidirectionalIterator>));
BOOST_MPL_ASSERT_NOT((duck::is_more_specific_than<
duck::RandomAccessIterator,
duck::IncrementableIterator>));
BOOST_MPL_ASSERT_NOT((duck::is_more_specific_than<
duck::ForwardIterator,
duck::ForwardIterator>));
BOOST_MPL_ASSERT_NOT((duck::is_more_specific_than<
duck::RandomAccessIterator,
duck::ForwardIterator>)); | test/iterator_concepts_ordering.cpp | C++ | a625de351c3b129f11faf26330dafdb16f10b855 | <|file_sep|>test/iterator_concepts_ordering.cpp.diff
original:
updated:
BOOST_MPL_ASSERT((duck::is_more_specific_than<
duck::ForwardIterator,
duck::RandomAccessIterator>));
<|file_sep|>original/test/iterator_concepts_ordering.cpp
BOOST_MPL_ASSERT((duck::is_more_specific_than<
duck::BidirectionalIterator,
duck::RandomAccessIterator>));
BOOST_MPL_ASSERT((duck::is_more_specific_than<
duck::IncrementableIterator,
duck::RandomAccessIterator>));
BOOST_MPL_ASSERT_NOT((duck::is_more_specific_than<
duck::RandomAccessIterator,
duck::BidirectionalIterator>));
BOOST_MPL_ASSERT_NOT((duck::is_more_specific_than<
duck::RandomAccessIterator,
duck::IncrementableIterator>));
BOOST_MPL_ASSERT_NOT((duck::is_more_specific_than<
duck::ForwardIterator,
duck::ForwardIterator>));
<|file_sep|>current/test/iterator_concepts_ordering.cpp
BOOST_MPL_ASSERT((duck::is_more_specific_than<
duck::IncrementableIterator,
duck::RandomAccessIterator>));
BOOST_MPL_ASSERT((duck::is_more_specific_than<
duck::ForwardIterator,
duck::RandomAccessIterator>));
BOOST_MPL_ASSERT_NOT((duck::is_more_specific_than<
duck::RandomAccessIterator,
duck::BidirectionalIterator>));
BOOST_MPL_ASSERT_NOT((duck::is_more_specific_than<
duck::RandomAccessIterator,
duck::IncrementableIterator>));
BOOST_MPL_ASSERT_NOT((duck::is_more_specific_than<
duck::ForwardIterator,
duck::ForwardIterator>));
<|file_sep|>updated/test/iterator_concepts_ordering.cpp
BOOST_MPL_ASSERT((duck::is_more_specific_than<
duck::ForwardIterator,
duck::RandomAccessIterator>));
BOOST_MPL_ASSERT_NOT((duck::is_more_specific_than<
duck::RandomAccessIterator,
duck::BidirectionalIterator>));
BOOST_MPL_ASSERT_NOT((duck::is_more_specific_than<
duck::RandomAccessIterator,
duck::IncrementableIterator>));
BOOST_MPL_ASSERT_NOT((duck::is_more_specific_than<
duck::ForwardIterator,
duck::ForwardIterator>));
BOOST_MPL_ASSERT_NOT((duck::is_more_specific_than<
duck::RandomAccessIterator,
duck::ForwardIterator>)); |
<|file_sep|>main.cpp.diff
original:
updated:
const QString APP_ORGNAME = "PepperNote";
const QString APP_APPNAME = "PepperNote";
<|file_sep|>original/main.cpp
#include <QApplication>
#include "mainwindow.h"
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
MainWindow w;
w.show();
return a.exec();
}
<|file_sep|>current/main.cpp
#include <QApplication>
#include "mainwindow.h"
const QString APP_ORGNAME = "PepperNote";
const QString APP_APPNAME = "PepperNote";
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
MainWindow w;
w.show();
return a.exec();
}
<|file_sep|>updated/main.cpp | #include <QApplication>
#include "mainwindow.h"
const QString APP_ORGNAME = "PepperNote";
const QString APP_APPNAME = "PepperNote";
int main(int argc, char *argv[])
{
QCoreApplication::setOrganizationName(APP_ORGNAME);
QCoreApplication::setApplicationName(APP_APPNAME);
QApplication a(argc, argv);
MainWindow w;
w.show();
return a.exec();
} | main.cpp | C++ | dbf2bac7fed179f25956d8783ab619de31131288 | <|file_sep|>main.cpp.diff
original:
updated:
const QString APP_ORGNAME = "PepperNote";
const QString APP_APPNAME = "PepperNote";
<|file_sep|>original/main.cpp
#include <QApplication>
#include "mainwindow.h"
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
MainWindow w;
w.show();
return a.exec();
}
<|file_sep|>current/main.cpp
#include <QApplication>
#include "mainwindow.h"
const QString APP_ORGNAME = "PepperNote";
const QString APP_APPNAME = "PepperNote";
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
MainWindow w;
w.show();
return a.exec();
}
<|file_sep|>updated/main.cpp
#include <QApplication>
#include "mainwindow.h"
const QString APP_ORGNAME = "PepperNote";
const QString APP_APPNAME = "PepperNote";
int main(int argc, char *argv[])
{
QCoreApplication::setOrganizationName(APP_ORGNAME);
QCoreApplication::setApplicationName(APP_APPNAME);
QApplication a(argc, argv);
MainWindow w;
w.show();
return a.exec();
} |
<|file_sep|>engine/src/level.cpp.diff
original:
updated:
#include <iostream>
<|file_sep|>original/engine/src/level.cpp
for(auto hit : game_object->get_hitboxes()){
hit->initialize();
}
}
}
void Level::free(){
for(auto game_object : objects){
std::cout << "Freeing" << game_object->name << std::endl;
game_object->free();
}
EventHandler::listeners.clear();
}
void Level::draw(){
for(auto game_object : objects){
if(game_object->is_active()){
game_object->draw();
}
}
}
<|file_sep|>current/engine/src/level.cpp
for(auto hit : game_object->get_hitboxes()){
hit->initialize();
}
}
}
void Level::free(){
for(auto game_object : objects){
std::cout << "Freeing" << game_object->name << std::endl;
game_object->free();
}
EventHandler::listeners.clear();
}
void Level::draw(){
for(auto game_object : objects){
if(game_object->is_active()){
game_object->draw();
}
}
}
<|file_sep|>updated/engine/src/level.cpp | }
void Level::free(){
for(auto game_object : objects){
std::cout << "Freeing" << game_object->name << std::endl;
game_object->free();
}
EventHandler::listeners.clear();
}
void Level::draw(){
for(auto game_object : objects){
if(game_object->is_active()){
if(game_object->name == "arm_left"){
game_object->set_actual_animation(game_object->animations["left_arm"]);
}
game_object->draw();
}
}
} | engine/src/level.cpp | C++ | 7dc394773390abe56a0024f1f113a6f644c8e083 | <|file_sep|>engine/src/level.cpp.diff
original:
updated:
#include <iostream>
<|file_sep|>original/engine/src/level.cpp
for(auto hit : game_object->get_hitboxes()){
hit->initialize();
}
}
}
void Level::free(){
for(auto game_object : objects){
std::cout << "Freeing" << game_object->name << std::endl;
game_object->free();
}
EventHandler::listeners.clear();
}
void Level::draw(){
for(auto game_object : objects){
if(game_object->is_active()){
game_object->draw();
}
}
}
<|file_sep|>current/engine/src/level.cpp
for(auto hit : game_object->get_hitboxes()){
hit->initialize();
}
}
}
void Level::free(){
for(auto game_object : objects){
std::cout << "Freeing" << game_object->name << std::endl;
game_object->free();
}
EventHandler::listeners.clear();
}
void Level::draw(){
for(auto game_object : objects){
if(game_object->is_active()){
game_object->draw();
}
}
}
<|file_sep|>updated/engine/src/level.cpp
}
void Level::free(){
for(auto game_object : objects){
std::cout << "Freeing" << game_object->name << std::endl;
game_object->free();
}
EventHandler::listeners.clear();
}
void Level::draw(){
for(auto game_object : objects){
if(game_object->is_active()){
if(game_object->name == "arm_left"){
game_object->set_actual_animation(game_object->animations["left_arm"]);
}
game_object->draw();
}
}
} |
<|file_sep|>stub/src/qtfirebase.cpp.diff
original:
updated:
#include "qtfirebasemessaging.h"
<|file_sep|>original/stub/src/qtfirebase.cpp
#include "qtfirebasedatabase.h"
#ifdef QTFIREBASE_BUILD_ANALYTICS
QtFirebaseAnalytics* QtFirebaseAnalytics::self = nullptr;
#endif
#ifdef QTFIREBASE_BUILD_REMOTE_CONFIG
QtFirebaseRemoteConfig* QtFirebaseRemoteConfig::self = nullptr;
#endif
#ifdef QTFIREBASE_BUILD_ADMOB
QtFirebaseAdMob *QtFirebaseAdMob::self = nullptr;
#endif
#ifdef QTFIREBASE_BUILD_AUTH
QtFirebaseAuth *QtFirebaseAuth::self = nullptr;
#endif
#ifdef QTFIREBASE_BUILD_DATABASE
QtFirebaseDatabase *QtFirebaseDatabase::self = nullptr;
#endif
<|file_sep|>current/stub/src/qtfirebase.cpp
#include "qtfirebasemessaging.h"
#ifdef QTFIREBASE_BUILD_ANALYTICS
QtFirebaseAnalytics* QtFirebaseAnalytics::self = nullptr;
#endif
#ifdef QTFIREBASE_BUILD_REMOTE_CONFIG
QtFirebaseRemoteConfig* QtFirebaseRemoteConfig::self = nullptr;
#endif
#ifdef QTFIREBASE_BUILD_ADMOB
QtFirebaseAdMob *QtFirebaseAdMob::self = nullptr;
#endif
#ifdef QTFIREBASE_BUILD_AUTH
QtFirebaseAuth *QtFirebaseAuth::self = nullptr;
#endif
#ifdef QTFIREBASE_BUILD_DATABASE
QtFirebaseDatabase *QtFirebaseDatabase::self = nullptr;
#endif
<|file_sep|>updated/stub/src/qtfirebase.cpp | #endif
#ifdef QTFIREBASE_BUILD_REMOTE_CONFIG
QtFirebaseRemoteConfig* QtFirebaseRemoteConfig::self = nullptr;
#endif
#ifdef QTFIREBASE_BUILD_ADMOB
QtFirebaseAdMob *QtFirebaseAdMob::self = nullptr;
#endif
#ifdef QTFIREBASE_BUILD_AUTH
QtFirebaseAuth *QtFirebaseAuth::self = nullptr;
#endif
#ifdef QTFIREBASE_BUILD_DATABASE
QtFirebaseDatabase *QtFirebaseDatabase::self = nullptr;
#endif
#ifdef QTFIREBASE_BUILD_MESSAGING
QtFirebaseMessaging *QtFirebaseMessaging::self = nullptr;
#endif | stub/src/qtfirebase.cpp | C++ | 2b5eb8f79e75bd7fab3221acf806e70d468ce48a | <|file_sep|>stub/src/qtfirebase.cpp.diff
original:
updated:
#include "qtfirebasemessaging.h"
<|file_sep|>original/stub/src/qtfirebase.cpp
#include "qtfirebasedatabase.h"
#ifdef QTFIREBASE_BUILD_ANALYTICS
QtFirebaseAnalytics* QtFirebaseAnalytics::self = nullptr;
#endif
#ifdef QTFIREBASE_BUILD_REMOTE_CONFIG
QtFirebaseRemoteConfig* QtFirebaseRemoteConfig::self = nullptr;
#endif
#ifdef QTFIREBASE_BUILD_ADMOB
QtFirebaseAdMob *QtFirebaseAdMob::self = nullptr;
#endif
#ifdef QTFIREBASE_BUILD_AUTH
QtFirebaseAuth *QtFirebaseAuth::self = nullptr;
#endif
#ifdef QTFIREBASE_BUILD_DATABASE
QtFirebaseDatabase *QtFirebaseDatabase::self = nullptr;
#endif
<|file_sep|>current/stub/src/qtfirebase.cpp
#include "qtfirebasemessaging.h"
#ifdef QTFIREBASE_BUILD_ANALYTICS
QtFirebaseAnalytics* QtFirebaseAnalytics::self = nullptr;
#endif
#ifdef QTFIREBASE_BUILD_REMOTE_CONFIG
QtFirebaseRemoteConfig* QtFirebaseRemoteConfig::self = nullptr;
#endif
#ifdef QTFIREBASE_BUILD_ADMOB
QtFirebaseAdMob *QtFirebaseAdMob::self = nullptr;
#endif
#ifdef QTFIREBASE_BUILD_AUTH
QtFirebaseAuth *QtFirebaseAuth::self = nullptr;
#endif
#ifdef QTFIREBASE_BUILD_DATABASE
QtFirebaseDatabase *QtFirebaseDatabase::self = nullptr;
#endif
<|file_sep|>updated/stub/src/qtfirebase.cpp
#endif
#ifdef QTFIREBASE_BUILD_REMOTE_CONFIG
QtFirebaseRemoteConfig* QtFirebaseRemoteConfig::self = nullptr;
#endif
#ifdef QTFIREBASE_BUILD_ADMOB
QtFirebaseAdMob *QtFirebaseAdMob::self = nullptr;
#endif
#ifdef QTFIREBASE_BUILD_AUTH
QtFirebaseAuth *QtFirebaseAuth::self = nullptr;
#endif
#ifdef QTFIREBASE_BUILD_DATABASE
QtFirebaseDatabase *QtFirebaseDatabase::self = nullptr;
#endif
#ifdef QTFIREBASE_BUILD_MESSAGING
QtFirebaseMessaging *QtFirebaseMessaging::self = nullptr;
#endif |
<|file_sep|>src/main.cpp.diff
original:
updated:
#include <QImageReader>
<|file_sep|>original/src/main.cpp
/*
Copyright (c), Helios
All rights reserved.
Distributed under a permissive license. See COPYING.txt for details.
*/
#include "ImageViewerApplication.h"
int main(int argc, char **argv){
try{
initialize_supported_extensions();
ImageViewerApplication app(argc, argv, "BorderlessViewer" + get_per_user_unique_id());
return app.exec();
}catch (ApplicationAlreadyRunningException &){
return 0;
}catch (NoWindowsException &){
return 0;
}
}
<|file_sep|>current/src/main.cpp
/*
Copyright (c), Helios
All rights reserved.
Distributed under a permissive license. See COPYING.txt for details.
*/
#include "ImageViewerApplication.h"
#include <QImageReader>
int main(int argc, char **argv){
try{
initialize_supported_extensions();
ImageViewerApplication app(argc, argv, "BorderlessViewer" + get_per_user_unique_id());
return app.exec();
}catch (ApplicationAlreadyRunningException &){
return 0;
}catch (NoWindowsException &){
return 0;
}
}
<|file_sep|>updated/src/main.cpp | All rights reserved.
Distributed under a permissive license. See COPYING.txt for details.
*/
#include "ImageViewerApplication.h"
#include <QImageReader>
int main(int argc, char **argv){
try{
//Set the limit to 1 GiB.
QImageReader::setAllocationLimit(1024);
initialize_supported_extensions();
ImageViewerApplication app(argc, argv, "BorderlessViewer" + get_per_user_unique_id());
return app.exec();
}catch (ApplicationAlreadyRunningException &){
return 0;
}catch (NoWindowsException &){
return 0;
}
} | src/main.cpp | C++ | 5b362013706f78b84bf205c6cf04e31065f7b732 | <|file_sep|>src/main.cpp.diff
original:
updated:
#include <QImageReader>
<|file_sep|>original/src/main.cpp
/*
Copyright (c), Helios
All rights reserved.
Distributed under a permissive license. See COPYING.txt for details.
*/
#include "ImageViewerApplication.h"
int main(int argc, char **argv){
try{
initialize_supported_extensions();
ImageViewerApplication app(argc, argv, "BorderlessViewer" + get_per_user_unique_id());
return app.exec();
}catch (ApplicationAlreadyRunningException &){
return 0;
}catch (NoWindowsException &){
return 0;
}
}
<|file_sep|>current/src/main.cpp
/*
Copyright (c), Helios
All rights reserved.
Distributed under a permissive license. See COPYING.txt for details.
*/
#include "ImageViewerApplication.h"
#include <QImageReader>
int main(int argc, char **argv){
try{
initialize_supported_extensions();
ImageViewerApplication app(argc, argv, "BorderlessViewer" + get_per_user_unique_id());
return app.exec();
}catch (ApplicationAlreadyRunningException &){
return 0;
}catch (NoWindowsException &){
return 0;
}
}
<|file_sep|>updated/src/main.cpp
All rights reserved.
Distributed under a permissive license. See COPYING.txt for details.
*/
#include "ImageViewerApplication.h"
#include <QImageReader>
int main(int argc, char **argv){
try{
//Set the limit to 1 GiB.
QImageReader::setAllocationLimit(1024);
initialize_supported_extensions();
ImageViewerApplication app(argc, argv, "BorderlessViewer" + get_per_user_unique_id());
return app.exec();
}catch (ApplicationAlreadyRunningException &){
return 0;
}catch (NoWindowsException &){
return 0;
}
} |
<|file_sep|>JasonType.cpp.diff
original:
updated:
case JasonType::ArrayLong: return "array_long";
<|file_sep|>original/JasonType.cpp
char const* triagens::basics::JasonTypeName (JasonType type) {
switch (type) {
case JasonType::None: return "none";
case JasonType::Null: return "null";
case JasonType::Bool: return "bool";
case JasonType::Double: return "double";
case JasonType::String: return "string";
case JasonType::Array: return "array";
case JasonType::Object: return "object";
case JasonType::External: return "external";
case JasonType::ID: return "id";
case JasonType::ArangoDB_id: return "arangodb_id";
case JasonType::UTCDate: return "utc-date";
case JasonType::Int: return "int";
case JasonType::UInt: return "uint";
case JasonType::Binary: return "binary";
}
return "unknown";
}
<|file_sep|>current/JasonType.cpp
char const* triagens::basics::JasonTypeName (JasonType type) {
switch (type) {
case JasonType::None: return "none";
case JasonType::Null: return "null";
case JasonType::Bool: return "bool";
case JasonType::Double: return "double";
case JasonType::String: return "string";
case JasonType::Array: return "array";
case JasonType::ArrayLong: return "array_long";
case JasonType::Object: return "object";
case JasonType::External: return "external";
case JasonType::ID: return "id";
case JasonType::ArangoDB_id: return "arangodb_id";
case JasonType::UTCDate: return "utc-date";
case JasonType::Int: return "int";
case JasonType::UInt: return "uint";
case JasonType::Binary: return "binary";
}
return "unknown";
<|file_sep|>updated/JasonType.cpp | char const* triagens::basics::JasonTypeName (JasonType type) {
switch (type) {
case JasonType::None: return "none";
case JasonType::Null: return "null";
case JasonType::Bool: return "bool";
case JasonType::Double: return "double";
case JasonType::String: return "string";
case JasonType::Array: return "array";
case JasonType::ArrayLong: return "array_long";
case JasonType::Object: return "object";
case JasonType::ObjectLong: return "object_long";
case JasonType::External: return "external";
case JasonType::ID: return "id";
case JasonType::ArangoDB_id: return "arangodb_id";
case JasonType::UTCDate: return "utc-date";
case JasonType::Int: return "int";
case JasonType::UInt: return "uint";
case JasonType::Binary: return "binary";
}
return "unknown"; | JasonType.cpp | C++ | 905cba4c0107520616c2b95515042b283aab28c4 | <|file_sep|>JasonType.cpp.diff
original:
updated:
case JasonType::ArrayLong: return "array_long";
<|file_sep|>original/JasonType.cpp
char const* triagens::basics::JasonTypeName (JasonType type) {
switch (type) {
case JasonType::None: return "none";
case JasonType::Null: return "null";
case JasonType::Bool: return "bool";
case JasonType::Double: return "double";
case JasonType::String: return "string";
case JasonType::Array: return "array";
case JasonType::Object: return "object";
case JasonType::External: return "external";
case JasonType::ID: return "id";
case JasonType::ArangoDB_id: return "arangodb_id";
case JasonType::UTCDate: return "utc-date";
case JasonType::Int: return "int";
case JasonType::UInt: return "uint";
case JasonType::Binary: return "binary";
}
return "unknown";
}
<|file_sep|>current/JasonType.cpp
char const* triagens::basics::JasonTypeName (JasonType type) {
switch (type) {
case JasonType::None: return "none";
case JasonType::Null: return "null";
case JasonType::Bool: return "bool";
case JasonType::Double: return "double";
case JasonType::String: return "string";
case JasonType::Array: return "array";
case JasonType::ArrayLong: return "array_long";
case JasonType::Object: return "object";
case JasonType::External: return "external";
case JasonType::ID: return "id";
case JasonType::ArangoDB_id: return "arangodb_id";
case JasonType::UTCDate: return "utc-date";
case JasonType::Int: return "int";
case JasonType::UInt: return "uint";
case JasonType::Binary: return "binary";
}
return "unknown";
<|file_sep|>updated/JasonType.cpp
char const* triagens::basics::JasonTypeName (JasonType type) {
switch (type) {
case JasonType::None: return "none";
case JasonType::Null: return "null";
case JasonType::Bool: return "bool";
case JasonType::Double: return "double";
case JasonType::String: return "string";
case JasonType::Array: return "array";
case JasonType::ArrayLong: return "array_long";
case JasonType::Object: return "object";
case JasonType::ObjectLong: return "object_long";
case JasonType::External: return "external";
case JasonType::ID: return "id";
case JasonType::ArangoDB_id: return "arangodb_id";
case JasonType::UTCDate: return "utc-date";
case JasonType::Int: return "int";
case JasonType::UInt: return "uint";
case JasonType::Binary: return "binary";
}
return "unknown"; |
<|file_sep|>opencog/atoms/core/Checkers.cc.diff
original:
updated:
/// Check to see if every input atom is of Evaluatable type.
<|file_sep|>original/opencog/atoms/core/Checkers.cc
* You should have received a copy of the GNU Affero General Public License
* along with this program; if not, write to:
* Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include <opencog/atoms/base/Atom.h>
#include <opencog/atoms/base/ClassServer.h>
using namespace opencog;
bool check_evaluatable(const Handle& bool_atom)
{
return true;
}
/* This runs when the shared lib is loaded. */
static __attribute__ ((constructor)) void init(void)
{
classserver().addValidator(BOOLEAN_LINK, check_evaluatable);
}
<|file_sep|>current/opencog/atoms/core/Checkers.cc
* along with this program; if not, write to:
* Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include <opencog/atoms/base/Atom.h>
#include <opencog/atoms/base/ClassServer.h>
using namespace opencog;
/// Check to see if every input atom is of Evaluatable type.
bool check_evaluatable(const Handle& bool_atom)
{
return true;
}
/* This runs when the shared lib is loaded. */
static __attribute__ ((constructor)) void init(void)
{
classserver().addValidator(BOOLEAN_LINK, check_evaluatable);
}
<|file_sep|>updated/opencog/atoms/core/Checkers.cc |
#include <opencog/atoms/base/Atom.h>
#include <opencog/atoms/base/ClassServer.h>
using namespace opencog;
/// Check to see if every input atom is of Evaluatable type.
bool check_evaluatable(const Handle& bool_atom)
{
for (const Handle& h: bool_atom->getOutgoingSet())
{
if (not h->is_type(EVALUATABLE_LINK)) return false;
}
return true;
}
/* This runs when the shared lib is loaded. */
static __attribute__ ((constructor)) void init(void)
{
classserver().addValidator(BOOLEAN_LINK, check_evaluatable);
} | opencog/atoms/core/Checkers.cc | C++ | 961d8ba3e631d3fbbbb6de91e98f63d5a9a7bbb5 | <|file_sep|>opencog/atoms/core/Checkers.cc.diff
original:
updated:
/// Check to see if every input atom is of Evaluatable type.
<|file_sep|>original/opencog/atoms/core/Checkers.cc
* You should have received a copy of the GNU Affero General Public License
* along with this program; if not, write to:
* Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include <opencog/atoms/base/Atom.h>
#include <opencog/atoms/base/ClassServer.h>
using namespace opencog;
bool check_evaluatable(const Handle& bool_atom)
{
return true;
}
/* This runs when the shared lib is loaded. */
static __attribute__ ((constructor)) void init(void)
{
classserver().addValidator(BOOLEAN_LINK, check_evaluatable);
}
<|file_sep|>current/opencog/atoms/core/Checkers.cc
* along with this program; if not, write to:
* Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include <opencog/atoms/base/Atom.h>
#include <opencog/atoms/base/ClassServer.h>
using namespace opencog;
/// Check to see if every input atom is of Evaluatable type.
bool check_evaluatable(const Handle& bool_atom)
{
return true;
}
/* This runs when the shared lib is loaded. */
static __attribute__ ((constructor)) void init(void)
{
classserver().addValidator(BOOLEAN_LINK, check_evaluatable);
}
<|file_sep|>updated/opencog/atoms/core/Checkers.cc
#include <opencog/atoms/base/Atom.h>
#include <opencog/atoms/base/ClassServer.h>
using namespace opencog;
/// Check to see if every input atom is of Evaluatable type.
bool check_evaluatable(const Handle& bool_atom)
{
for (const Handle& h: bool_atom->getOutgoingSet())
{
if (not h->is_type(EVALUATABLE_LINK)) return false;
}
return true;
}
/* This runs when the shared lib is loaded. */
static __attribute__ ((constructor)) void init(void)
{
classserver().addValidator(BOOLEAN_LINK, check_evaluatable);
} |
<|file_sep|>testbed/windows/runner/main.cpp.diff
original:
updated:
// Initialize COM, so that it is available for use in the library and/or plugins.
::CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED);
<|file_sep|>original/testbed/windows/runner/main.cpp
}
RunLoop run_loop;
flutter::DartProject project(L"data");
#ifndef _DEBUG
project.SetEngineSwitches({"--disable-dart-asserts"});
#endif
FlutterWindow window(&run_loop, project);
Win32Window::Point origin(kFlutterWindowOriginX, kFlutterWindowOriginY);
Win32Window::Size size(kFlutterWindowWidth, kFlutterWindowHeight);
if (!window.CreateAndShow(kFlutterWindowTitle, origin, size)) {
return EXIT_FAILURE;
}
window.SetQuitOnClose(true);
run_loop.Run();
return EXIT_SUCCESS;
}
<|file_sep|>current/testbed/windows/runner/main.cpp
::CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED);
RunLoop run_loop;
flutter::DartProject project(L"data");
#ifndef _DEBUG
project.SetEngineSwitches({"--disable-dart-asserts"});
#endif
FlutterWindow window(&run_loop, project);
Win32Window::Point origin(kFlutterWindowOriginX, kFlutterWindowOriginY);
Win32Window::Size size(kFlutterWindowWidth, kFlutterWindowHeight);
if (!window.CreateAndShow(kFlutterWindowTitle, origin, size)) {
return EXIT_FAILURE;
}
window.SetQuitOnClose(true);
run_loop.Run();
return EXIT_SUCCESS;
}
<|file_sep|>updated/testbed/windows/runner/main.cpp |
RunLoop run_loop;
flutter::DartProject project(L"data");
#ifndef _DEBUG
project.SetEngineSwitches({"--disable-dart-asserts"});
#endif
FlutterWindow window(&run_loop, project);
Win32Window::Point origin(kFlutterWindowOriginX, kFlutterWindowOriginY);
Win32Window::Size size(kFlutterWindowWidth, kFlutterWindowHeight);
if (!window.CreateAndShow(kFlutterWindowTitle, origin, size)) {
return EXIT_FAILURE;
}
window.SetQuitOnClose(true);
run_loop.Run();
::CoUninitialize();
return EXIT_SUCCESS;
} | testbed/windows/runner/main.cpp | C++ | 100bc306dd15532dbbb2b353170aea47e8173a13 | <|file_sep|>testbed/windows/runner/main.cpp.diff
original:
updated:
// Initialize COM, so that it is available for use in the library and/or plugins.
::CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED);
<|file_sep|>original/testbed/windows/runner/main.cpp
}
RunLoop run_loop;
flutter::DartProject project(L"data");
#ifndef _DEBUG
project.SetEngineSwitches({"--disable-dart-asserts"});
#endif
FlutterWindow window(&run_loop, project);
Win32Window::Point origin(kFlutterWindowOriginX, kFlutterWindowOriginY);
Win32Window::Size size(kFlutterWindowWidth, kFlutterWindowHeight);
if (!window.CreateAndShow(kFlutterWindowTitle, origin, size)) {
return EXIT_FAILURE;
}
window.SetQuitOnClose(true);
run_loop.Run();
return EXIT_SUCCESS;
}
<|file_sep|>current/testbed/windows/runner/main.cpp
::CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED);
RunLoop run_loop;
flutter::DartProject project(L"data");
#ifndef _DEBUG
project.SetEngineSwitches({"--disable-dart-asserts"});
#endif
FlutterWindow window(&run_loop, project);
Win32Window::Point origin(kFlutterWindowOriginX, kFlutterWindowOriginY);
Win32Window::Size size(kFlutterWindowWidth, kFlutterWindowHeight);
if (!window.CreateAndShow(kFlutterWindowTitle, origin, size)) {
return EXIT_FAILURE;
}
window.SetQuitOnClose(true);
run_loop.Run();
return EXIT_SUCCESS;
}
<|file_sep|>updated/testbed/windows/runner/main.cpp
RunLoop run_loop;
flutter::DartProject project(L"data");
#ifndef _DEBUG
project.SetEngineSwitches({"--disable-dart-asserts"});
#endif
FlutterWindow window(&run_loop, project);
Win32Window::Point origin(kFlutterWindowOriginX, kFlutterWindowOriginY);
Win32Window::Size size(kFlutterWindowWidth, kFlutterWindowHeight);
if (!window.CreateAndShow(kFlutterWindowTitle, origin, size)) {
return EXIT_FAILURE;
}
window.SetQuitOnClose(true);
run_loop.Run();
::CoUninitialize();
return EXIT_SUCCESS;
} |
<|file_sep|>src/insert_mode.cc.diff
original:
updated:
contents.is_inserting = true;
<|file_sep|>src/insert_mode.cc.diff
original:
updated:
contents.is_inserting = false;
<|file_sep|>src/insert_mode.cc.diff
original:
updated:
contents.is_inserting = true;
<|file_sep|>original/src/insert_mode.cc
contents.cont[contents.y].insert(contents.x, 1, ch);
mvf(contents);
if(get_contents().refresh) {
print_contents(get_contents());
}
}
}
void enter_replace_mode(contents& contents, boost::optional<int>) {
char ch;
while((ch = getch()) != _escape) {
if(contents.x >= contents.cont[contents.y].size()) {
contents.cont[contents.y].push_back(ch);
} else {
contents.cont[contents.y][contents.x] = ch;
}
if(get_contents().refresh) {
print_contents(get_contents());
}
}
}
<|file_sep|>current/src/insert_mode.cc
if(get_contents().refresh) {
print_contents(get_contents());
}
}
contents.is_inserting = false;
}
void enter_replace_mode(contents& contents, boost::optional<int>) {
char ch;
contents.is_inserting = true;
while((ch = getch()) != _escape) {
if(contents.x >= contents.cont[contents.y].size()) {
contents.cont[contents.y].push_back(ch);
} else {
contents.cont[contents.y][contents.x] = ch;
}
if(get_contents().refresh) {
print_contents(get_contents());
}
}
}
<|file_sep|>updated/src/insert_mode.cc | print_contents(get_contents());
}
}
contents.is_inserting = false;
}
void enter_replace_mode(contents& contents, boost::optional<int>) {
char ch;
contents.is_inserting = true;
while((ch = getch()) != _escape) {
if(contents.x >= contents.cont[contents.y].size()) {
contents.cont[contents.y].push_back(ch);
} else {
contents.cont[contents.y][contents.x] = ch;
}
if(get_contents().refresh) {
print_contents(get_contents());
}
}
contents.is_inserting = false;
} | src/insert_mode.cc | C++ | e8fb48684147d54f5088194d644a1966c5421b86 | <|file_sep|>src/insert_mode.cc.diff
original:
updated:
contents.is_inserting = true;
<|file_sep|>src/insert_mode.cc.diff
original:
updated:
contents.is_inserting = false;
<|file_sep|>src/insert_mode.cc.diff
original:
updated:
contents.is_inserting = true;
<|file_sep|>original/src/insert_mode.cc
contents.cont[contents.y].insert(contents.x, 1, ch);
mvf(contents);
if(get_contents().refresh) {
print_contents(get_contents());
}
}
}
void enter_replace_mode(contents& contents, boost::optional<int>) {
char ch;
while((ch = getch()) != _escape) {
if(contents.x >= contents.cont[contents.y].size()) {
contents.cont[contents.y].push_back(ch);
} else {
contents.cont[contents.y][contents.x] = ch;
}
if(get_contents().refresh) {
print_contents(get_contents());
}
}
}
<|file_sep|>current/src/insert_mode.cc
if(get_contents().refresh) {
print_contents(get_contents());
}
}
contents.is_inserting = false;
}
void enter_replace_mode(contents& contents, boost::optional<int>) {
char ch;
contents.is_inserting = true;
while((ch = getch()) != _escape) {
if(contents.x >= contents.cont[contents.y].size()) {
contents.cont[contents.y].push_back(ch);
} else {
contents.cont[contents.y][contents.x] = ch;
}
if(get_contents().refresh) {
print_contents(get_contents());
}
}
}
<|file_sep|>updated/src/insert_mode.cc
print_contents(get_contents());
}
}
contents.is_inserting = false;
}
void enter_replace_mode(contents& contents, boost::optional<int>) {
char ch;
contents.is_inserting = true;
while((ch = getch()) != _escape) {
if(contents.x >= contents.cont[contents.y].size()) {
contents.cont[contents.y].push_back(ch);
} else {
contents.cont[contents.y][contents.x] = ch;
}
if(get_contents().refresh) {
print_contents(get_contents());
}
}
contents.is_inserting = false;
} |
<|file_sep|>logicTest.cpp.diff
original:
updated:
std::cout << i << " {" << std::endl;
<|file_sep|>original/logicTest.cpp
int rotationTest( void )
{
for( int i = 0; i < 5; ++i )
{
auto b1 = new block( i );
printCoords( b1 );
b1->rotate();
printCoords( b1 );
b1->rotate();
printCoords( b1 );
b1->rotate();
printCoords( b1 );
b1->rotate();
printCoords( b1 );
delete b1;
}
return 1;
}
<|file_sep|>current/logicTest.cpp
for( int i = 0; i < 5; ++i )
{
auto b1 = new block( i );
std::cout << i << " {" << std::endl;
printCoords( b1 );
b1->rotate();
printCoords( b1 );
b1->rotate();
printCoords( b1 );
b1->rotate();
printCoords( b1 );
b1->rotate();
printCoords( b1 );
delete b1;
}
return 1;
}
<|file_sep|>updated/logicTest.cpp | auto b1 = new block( i );
std::cout << i << " {" << std::endl;
printCoords( b1 );
b1->rotate();
printCoords( b1 );
b1->rotate();
printCoords( b1 );
b1->rotate();
printCoords( b1 );
b1->rotate();
printCoords( b1 );
std::cout << "}" << std::endl;
delete b1;
}
return 1;
} | logicTest.cpp | C++ | af7ba3b71fcbda1ee1bef496c712da65712574d3 | <|file_sep|>logicTest.cpp.diff
original:
updated:
std::cout << i << " {" << std::endl;
<|file_sep|>original/logicTest.cpp
int rotationTest( void )
{
for( int i = 0; i < 5; ++i )
{
auto b1 = new block( i );
printCoords( b1 );
b1->rotate();
printCoords( b1 );
b1->rotate();
printCoords( b1 );
b1->rotate();
printCoords( b1 );
b1->rotate();
printCoords( b1 );
delete b1;
}
return 1;
}
<|file_sep|>current/logicTest.cpp
for( int i = 0; i < 5; ++i )
{
auto b1 = new block( i );
std::cout << i << " {" << std::endl;
printCoords( b1 );
b1->rotate();
printCoords( b1 );
b1->rotate();
printCoords( b1 );
b1->rotate();
printCoords( b1 );
b1->rotate();
printCoords( b1 );
delete b1;
}
return 1;
}
<|file_sep|>updated/logicTest.cpp
auto b1 = new block( i );
std::cout << i << " {" << std::endl;
printCoords( b1 );
b1->rotate();
printCoords( b1 );
b1->rotate();
printCoords( b1 );
b1->rotate();
printCoords( b1 );
b1->rotate();
printCoords( b1 );
std::cout << "}" << std::endl;
delete b1;
}
return 1;
} |
<|file_sep|>src/searchclient/dlgfilters.cpp.diff
original:
updated:
#include <QLabel>
<|file_sep|>src/searchclient/dlgfilters.cpp.diff
original:
updated:
QLabel* explanation = new QLabel(tr("Define filters that determine which files will be included and which will be excluded from the index, e.g. '*.html' or '.svn/' (do not index directories called '.svn')."));
explanation->setWordWrap(true);
<|file_sep|>original/src/searchclient/dlgfilters.cpp
filterwidget = new FilterWidget();
filterwidget->setFilters(filters);
QPushButton* ok = new QPushButton(tr("&Ok"));
ok->setDefault(true);
QPushButton* cancel = new QPushButton(tr("&Cancel"));
QVBoxLayout* layout = new QVBoxLayout();
setLayout(layout);
layout->addWidget(filterwidget);
QHBoxLayout* hl = new QHBoxLayout();
layout->addLayout(hl);
hl->addStretch();
hl->addWidget(ok);
hl->addWidget(cancel);
connect(ok, SIGNAL(clicked()), this, SLOT(accept()));
connect(cancel, SIGNAL(clicked()), this, SLOT(reject()));
}
const QList<QPair<bool,QString> >&
DlgFilters::getFilters() const {
return filterwidget->getFilters();
}
<|file_sep|>current/src/searchclient/dlgfilters.cpp
setWindowTitle(tr("strigiclient - Edit filters"));
QLabel* explanation = new QLabel(tr("Define filters that determine which files will be included and which will be excluded from the index, e.g. '*.html' or '.svn/' (do not index directories called '.svn')."));
explanation->setWordWrap(true);
filterwidget = new FilterWidget();
filterwidget->setFilters(filters);
QPushButton* ok = new QPushButton(tr("&Ok"));
ok->setDefault(true);
QPushButton* cancel = new QPushButton(tr("&Cancel"));
QVBoxLayout* layout = new QVBoxLayout();
setLayout(layout);
layout->addWidget(filterwidget);
QHBoxLayout* hl = new QHBoxLayout();
layout->addLayout(hl);
hl->addStretch();
hl->addWidget(ok);
hl->addWidget(cancel);
connect(ok, SIGNAL(clicked()), this, SLOT(accept()));
connect(cancel, SIGNAL(clicked()), this, SLOT(reject()));
}
const QList<QPair<bool,QString> >&
<|file_sep|>updated/src/searchclient/dlgfilters.cpp | QLabel* explanation = new QLabel(tr("Define filters that determine which files will be included and which will be excluded from the index, e.g. '*.html' or '.svn/' (do not index directories called '.svn')."));
explanation->setWordWrap(true);
filterwidget = new FilterWidget();
filterwidget->setFilters(filters);
QPushButton* ok = new QPushButton(tr("&Ok"));
ok->setDefault(true);
QPushButton* cancel = new QPushButton(tr("&Cancel"));
QVBoxLayout* layout = new QVBoxLayout();
setLayout(layout);
layout->addWidget(explanation);
layout->addWidget(filterwidget);
QHBoxLayout* hl = new QHBoxLayout();
layout->addLayout(hl);
hl->addStretch();
hl->addWidget(ok);
hl->addWidget(cancel);
connect(ok, SIGNAL(clicked()), this, SLOT(accept()));
connect(cancel, SIGNAL(clicked()), this, SLOT(reject()));
}
const QList<QPair<bool,QString> >& | src/searchclient/dlgfilters.cpp | C++ | 250a86dc4041f75488d78653d9566b348e1b70c9 | <|file_sep|>src/searchclient/dlgfilters.cpp.diff
original:
updated:
#include <QLabel>
<|file_sep|>src/searchclient/dlgfilters.cpp.diff
original:
updated:
QLabel* explanation = new QLabel(tr("Define filters that determine which files will be included and which will be excluded from the index, e.g. '*.html' or '.svn/' (do not index directories called '.svn')."));
explanation->setWordWrap(true);
<|file_sep|>original/src/searchclient/dlgfilters.cpp
filterwidget = new FilterWidget();
filterwidget->setFilters(filters);
QPushButton* ok = new QPushButton(tr("&Ok"));
ok->setDefault(true);
QPushButton* cancel = new QPushButton(tr("&Cancel"));
QVBoxLayout* layout = new QVBoxLayout();
setLayout(layout);
layout->addWidget(filterwidget);
QHBoxLayout* hl = new QHBoxLayout();
layout->addLayout(hl);
hl->addStretch();
hl->addWidget(ok);
hl->addWidget(cancel);
connect(ok, SIGNAL(clicked()), this, SLOT(accept()));
connect(cancel, SIGNAL(clicked()), this, SLOT(reject()));
}
const QList<QPair<bool,QString> >&
DlgFilters::getFilters() const {
return filterwidget->getFilters();
}
<|file_sep|>current/src/searchclient/dlgfilters.cpp
setWindowTitle(tr("strigiclient - Edit filters"));
QLabel* explanation = new QLabel(tr("Define filters that determine which files will be included and which will be excluded from the index, e.g. '*.html' or '.svn/' (do not index directories called '.svn')."));
explanation->setWordWrap(true);
filterwidget = new FilterWidget();
filterwidget->setFilters(filters);
QPushButton* ok = new QPushButton(tr("&Ok"));
ok->setDefault(true);
QPushButton* cancel = new QPushButton(tr("&Cancel"));
QVBoxLayout* layout = new QVBoxLayout();
setLayout(layout);
layout->addWidget(filterwidget);
QHBoxLayout* hl = new QHBoxLayout();
layout->addLayout(hl);
hl->addStretch();
hl->addWidget(ok);
hl->addWidget(cancel);
connect(ok, SIGNAL(clicked()), this, SLOT(accept()));
connect(cancel, SIGNAL(clicked()), this, SLOT(reject()));
}
const QList<QPair<bool,QString> >&
<|file_sep|>updated/src/searchclient/dlgfilters.cpp
QLabel* explanation = new QLabel(tr("Define filters that determine which files will be included and which will be excluded from the index, e.g. '*.html' or '.svn/' (do not index directories called '.svn')."));
explanation->setWordWrap(true);
filterwidget = new FilterWidget();
filterwidget->setFilters(filters);
QPushButton* ok = new QPushButton(tr("&Ok"));
ok->setDefault(true);
QPushButton* cancel = new QPushButton(tr("&Cancel"));
QVBoxLayout* layout = new QVBoxLayout();
setLayout(layout);
layout->addWidget(explanation);
layout->addWidget(filterwidget);
QHBoxLayout* hl = new QHBoxLayout();
layout->addLayout(hl);
hl->addStretch();
hl->addWidget(ok);
hl->addWidget(cancel);
connect(ok, SIGNAL(clicked()), this, SLOT(accept()));
connect(cancel, SIGNAL(clicked()), this, SLOT(reject()));
}
const QList<QPair<bool,QString> >& |
<|file_sep|>src/floaxietest.cpp.diff
original:
updated:
#if __cplusplus >= 201402L
<|file_sep|>original/src/floaxietest.cpp
#include "test.h"
#include "floaxie/ftoa.h"
void dtoa_floaxie(double v, char* buffer)
{
floaxie::ftoa(v, buffer);
}
REGISTER_TEST(floaxie);
<|file_sep|>current/src/floaxietest.cpp
#if __cplusplus >= 201402L
#include "test.h"
#include "floaxie/ftoa.h"
void dtoa_floaxie(double v, char* buffer)
{
floaxie::ftoa(v, buffer);
}
REGISTER_TEST(floaxie);
<|file_sep|>updated/src/floaxietest.cpp | #if __cplusplus >= 201402L
#include "test.h"
#include "floaxie/ftoa.h"
void dtoa_floaxie(double v, char* buffer)
{
floaxie::ftoa(v, buffer);
}
REGISTER_TEST(floaxie);
#endif | src/floaxietest.cpp | C++ | 9709d7c0d15f61f6df20c6614476ed725da9b5bc | <|file_sep|>src/floaxietest.cpp.diff
original:
updated:
#if __cplusplus >= 201402L
<|file_sep|>original/src/floaxietest.cpp
#include "test.h"
#include "floaxie/ftoa.h"
void dtoa_floaxie(double v, char* buffer)
{
floaxie::ftoa(v, buffer);
}
REGISTER_TEST(floaxie);
<|file_sep|>current/src/floaxietest.cpp
#if __cplusplus >= 201402L
#include "test.h"
#include "floaxie/ftoa.h"
void dtoa_floaxie(double v, char* buffer)
{
floaxie::ftoa(v, buffer);
}
REGISTER_TEST(floaxie);
<|file_sep|>updated/src/floaxietest.cpp
#if __cplusplus >= 201402L
#include "test.h"
#include "floaxie/ftoa.h"
void dtoa_floaxie(double v, char* buffer)
{
floaxie::ftoa(v, buffer);
}
REGISTER_TEST(floaxie);
#endif |
<|file_sep|>notebooktree.cpp.diff
original:
updated:
#include <QHeaderView>
<|file_sep|>original/notebooktree.cpp
#include "notebooktree.h"
#include "treenotebookitem.h"
#include "treenotebookpageitem.h"
#include "notebookexception.h"
NotebookTree::NotebookTree(QWidget* parent) :
QTreeWidget(parent)
{
this->setColumnCount(1);
}
void NotebookTree::addNotebook(Notebook& notebook)
{
TreeNotebookItem* treeItem = new TreeNotebookItem(notebook);
if (this->notebookTrees.find(¬ebook) == this->notebookTrees.end())
{
this->notebookTrees[¬ebook] = treeItem;
this->addTopLevelItem(treeItem);
}
else
{
<|file_sep|>current/notebooktree.cpp
#include "notebooktree.h"
#include "treenotebookitem.h"
#include "treenotebookpageitem.h"
#include "notebookexception.h"
#include <QHeaderView>
NotebookTree::NotebookTree(QWidget* parent) :
QTreeWidget(parent)
{
this->setColumnCount(1);
}
void NotebookTree::addNotebook(Notebook& notebook)
{
TreeNotebookItem* treeItem = new TreeNotebookItem(notebook);
if (this->notebookTrees.find(¬ebook) == this->notebookTrees.end())
{
this->notebookTrees[¬ebook] = treeItem;
this->addTopLevelItem(treeItem);
}
<|file_sep|>updated/notebooktree.cpp | #include "treenotebookitem.h"
#include "treenotebookpageitem.h"
#include "notebookexception.h"
#include <QHeaderView>
NotebookTree::NotebookTree(QWidget* parent) :
QTreeWidget(parent)
{
this->setColumnCount(1);
this->header()->hide();
}
void NotebookTree::addNotebook(Notebook& notebook)
{
TreeNotebookItem* treeItem = new TreeNotebookItem(notebook);
if (this->notebookTrees.find(¬ebook) == this->notebookTrees.end())
{
this->notebookTrees[¬ebook] = treeItem;
this->addTopLevelItem(treeItem);
} | notebooktree.cpp | C++ | 739b903d8e5444d8dc19361fb1057f6821382c37 | <|file_sep|>notebooktree.cpp.diff
original:
updated:
#include <QHeaderView>
<|file_sep|>original/notebooktree.cpp
#include "notebooktree.h"
#include "treenotebookitem.h"
#include "treenotebookpageitem.h"
#include "notebookexception.h"
NotebookTree::NotebookTree(QWidget* parent) :
QTreeWidget(parent)
{
this->setColumnCount(1);
}
void NotebookTree::addNotebook(Notebook& notebook)
{
TreeNotebookItem* treeItem = new TreeNotebookItem(notebook);
if (this->notebookTrees.find(¬ebook) == this->notebookTrees.end())
{
this->notebookTrees[¬ebook] = treeItem;
this->addTopLevelItem(treeItem);
}
else
{
<|file_sep|>current/notebooktree.cpp
#include "notebooktree.h"
#include "treenotebookitem.h"
#include "treenotebookpageitem.h"
#include "notebookexception.h"
#include <QHeaderView>
NotebookTree::NotebookTree(QWidget* parent) :
QTreeWidget(parent)
{
this->setColumnCount(1);
}
void NotebookTree::addNotebook(Notebook& notebook)
{
TreeNotebookItem* treeItem = new TreeNotebookItem(notebook);
if (this->notebookTrees.find(¬ebook) == this->notebookTrees.end())
{
this->notebookTrees[¬ebook] = treeItem;
this->addTopLevelItem(treeItem);
}
<|file_sep|>updated/notebooktree.cpp
#include "treenotebookitem.h"
#include "treenotebookpageitem.h"
#include "notebookexception.h"
#include <QHeaderView>
NotebookTree::NotebookTree(QWidget* parent) :
QTreeWidget(parent)
{
this->setColumnCount(1);
this->header()->hide();
}
void NotebookTree::addNotebook(Notebook& notebook)
{
TreeNotebookItem* treeItem = new TreeNotebookItem(notebook);
if (this->notebookTrees.find(¬ebook) == this->notebookTrees.end())
{
this->notebookTrees[¬ebook] = treeItem;
this->addTopLevelItem(treeItem);
} |
<|file_sep|>Podrios.cpp.diff
original:
updated:
#include <stdlib.h>
<|file_sep|>original/Podrios.cpp
/*
* Podrios.cpp
*
* Created on: 2014年10月23日
* Author: nemo
*/
#include <iostream>
using namespace std;
int main()
{
cout << "Show Message." << endl;
return 0;
}
<|file_sep|>current/Podrios.cpp
/*
* Podrios.cpp
*
* Created on: 2014年10月23日
* Author: nemo
*/
#include <iostream>
#include <stdlib.h>
using namespace std;
int main()
{
cout << "Show Message." << endl;
return 0;
}
<|file_sep|>updated/Podrios.cpp | /*
* Podrios.cpp
*
* Created on: 2014年10月23日
* Author: nemo
*/
#include <iostream>
#include <stdlib.h>
using namespace std;
int main()
{
cout << "Show Message." << endl;
system("pause");
return 0;
} | Podrios.cpp | C++ | d40a92f3ad086b71d0df4bca5a2d615c8b8cb380 | <|file_sep|>Podrios.cpp.diff
original:
updated:
#include <stdlib.h>
<|file_sep|>original/Podrios.cpp
/*
* Podrios.cpp
*
* Created on: 2014年10月23日
* Author: nemo
*/
#include <iostream>
using namespace std;
int main()
{
cout << "Show Message." << endl;
return 0;
}
<|file_sep|>current/Podrios.cpp
/*
* Podrios.cpp
*
* Created on: 2014年10月23日
* Author: nemo
*/
#include <iostream>
#include <stdlib.h>
using namespace std;
int main()
{
cout << "Show Message." << endl;
return 0;
}
<|file_sep|>updated/Podrios.cpp
/*
* Podrios.cpp
*
* Created on: 2014年10月23日
* Author: nemo
*/
#include <iostream>
#include <stdlib.h>
using namespace std;
int main()
{
cout << "Show Message." << endl;
system("pause");
return 0;
} |
<|file_sep|>libeve-api-proxy/source/Error.cpp.diff
original:
updated:
#ifdef _WIN32
<|file_sep|>original/libeve-api-proxy/source/Error.cpp
#include "Precompiled.hpp"
#include "Error.hpp"
#include "SmartPtr.hpp"
#include "String.hpp"
std::string errno_string(int err)
{
char buffer[1024];
if (!strerror_s(buffer, sizeof(buffer), err)) throw std::runtime_error("strerror_s failed");
return buffer;
}
#ifdef _WIN32
std::string win_error_string(int err)
{
std::unique_ptr<wchar_t[], LocalFreeDeleter> buffer;
FormatMessageW(
FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
nullptr, err, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
(LPWSTR)(wchar_t**)unique_out_ptr(buffer), 0, nullptr);
<|file_sep|>current/libeve-api-proxy/source/Error.cpp
#include "Precompiled.hpp"
#include "Error.hpp"
#include "SmartPtr.hpp"
#include "String.hpp"
std::string errno_string(int err)
{
char buffer[1024];
#ifdef _WIN32
if (!strerror_s(buffer, sizeof(buffer), err)) throw std::runtime_error("strerror_s failed");
return buffer;
}
#ifdef _WIN32
std::string win_error_string(int err)
{
std::unique_ptr<wchar_t[], LocalFreeDeleter> buffer;
FormatMessageW(
FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
nullptr, err, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
<|file_sep|>updated/libeve-api-proxy/source/Error.cpp | #include "SmartPtr.hpp"
#include "String.hpp"
std::string errno_string(int err)
{
char buffer[1024];
#ifdef _WIN32
if (!strerror_s(buffer, sizeof(buffer), err)) throw std::runtime_error("strerror_s failed");
return buffer;
#else
return strerror_r(err, buffer, sizeof(buffer));
#endif
}
#ifdef _WIN32
std::string win_error_string(int err)
{
std::unique_ptr<wchar_t[], LocalFreeDeleter> buffer;
FormatMessageW(
FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, | libeve-api-proxy/source/Error.cpp | C++ | 86b112bfa96f8e2b1771f708c3f4aabc4a0b1e94 | <|file_sep|>libeve-api-proxy/source/Error.cpp.diff
original:
updated:
#ifdef _WIN32
<|file_sep|>original/libeve-api-proxy/source/Error.cpp
#include "Precompiled.hpp"
#include "Error.hpp"
#include "SmartPtr.hpp"
#include "String.hpp"
std::string errno_string(int err)
{
char buffer[1024];
if (!strerror_s(buffer, sizeof(buffer), err)) throw std::runtime_error("strerror_s failed");
return buffer;
}
#ifdef _WIN32
std::string win_error_string(int err)
{
std::unique_ptr<wchar_t[], LocalFreeDeleter> buffer;
FormatMessageW(
FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
nullptr, err, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
(LPWSTR)(wchar_t**)unique_out_ptr(buffer), 0, nullptr);
<|file_sep|>current/libeve-api-proxy/source/Error.cpp
#include "Precompiled.hpp"
#include "Error.hpp"
#include "SmartPtr.hpp"
#include "String.hpp"
std::string errno_string(int err)
{
char buffer[1024];
#ifdef _WIN32
if (!strerror_s(buffer, sizeof(buffer), err)) throw std::runtime_error("strerror_s failed");
return buffer;
}
#ifdef _WIN32
std::string win_error_string(int err)
{
std::unique_ptr<wchar_t[], LocalFreeDeleter> buffer;
FormatMessageW(
FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
nullptr, err, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
<|file_sep|>updated/libeve-api-proxy/source/Error.cpp
#include "SmartPtr.hpp"
#include "String.hpp"
std::string errno_string(int err)
{
char buffer[1024];
#ifdef _WIN32
if (!strerror_s(buffer, sizeof(buffer), err)) throw std::runtime_error("strerror_s failed");
return buffer;
#else
return strerror_r(err, buffer, sizeof(buffer));
#endif
}
#ifdef _WIN32
std::string win_error_string(int err)
{
std::unique_ptr<wchar_t[], LocalFreeDeleter> buffer;
FormatMessageW(
FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, |
<|file_sep|>main.cpp.diff
original:
updated:
#include <iostream>
<|file_sep|>original/main.cpp
#include <fstream>
using namespace std;
int main(int argc, char *argv[])
{
const string task_fname = "task_list.txt";
const size_t concurrency = 2;
ifstream task_stream{task_fname};
TaskListSimple task_list{task_stream, "./"};
JobList job_list;
auto loop = AIO_UVW::Loop::getDefault();
auto factory = make_shared<FactorySimple>(loop);
auto on_tick = make_shared< OnTickSimple<JobList> >(job_list, factory, task_list);
factory->set_OnTick(on_tick);
for (size_t i = 1; i <= concurrency; i++)
{
auto task = task_list.get();
<|file_sep|>current/main.cpp
#include <fstream>
#include <iostream>
using namespace std;
int main(int argc, char *argv[])
{
const string task_fname = "task_list.txt";
const size_t concurrency = 2;
ifstream task_stream{task_fname};
TaskListSimple task_list{task_stream, "./"};
JobList job_list;
auto loop = AIO_UVW::Loop::getDefault();
auto factory = make_shared<FactorySimple>(loop);
auto on_tick = make_shared< OnTickSimple<JobList> >(job_list, factory, task_list);
factory->set_OnTick(on_tick);
for (size_t i = 1; i <= concurrency; i++)
{
<|file_sep|>updated/main.cpp | using namespace std;
int main(int argc, char *argv[])
{
const string task_fname = "task_list.txt";
const size_t concurrency = 2;
ifstream task_stream{task_fname};
if ( !task_stream.is_open() )
{
cout << "Can`t open <" << task_fname << ">, break." << endl;
return 1;
}
TaskListSimple task_list{task_stream, "./"};
JobList job_list;
auto loop = AIO_UVW::Loop::getDefault();
auto factory = make_shared<FactorySimple>(loop);
auto on_tick = make_shared< OnTickSimple<JobList> >(job_list, factory, task_list);
factory->set_OnTick(on_tick);
| main.cpp | C++ | b6c95361843cea1a16e6a1287ce247987b668b2b | <|file_sep|>main.cpp.diff
original:
updated:
#include <iostream>
<|file_sep|>original/main.cpp
#include <fstream>
using namespace std;
int main(int argc, char *argv[])
{
const string task_fname = "task_list.txt";
const size_t concurrency = 2;
ifstream task_stream{task_fname};
TaskListSimple task_list{task_stream, "./"};
JobList job_list;
auto loop = AIO_UVW::Loop::getDefault();
auto factory = make_shared<FactorySimple>(loop);
auto on_tick = make_shared< OnTickSimple<JobList> >(job_list, factory, task_list);
factory->set_OnTick(on_tick);
for (size_t i = 1; i <= concurrency; i++)
{
auto task = task_list.get();
<|file_sep|>current/main.cpp
#include <fstream>
#include <iostream>
using namespace std;
int main(int argc, char *argv[])
{
const string task_fname = "task_list.txt";
const size_t concurrency = 2;
ifstream task_stream{task_fname};
TaskListSimple task_list{task_stream, "./"};
JobList job_list;
auto loop = AIO_UVW::Loop::getDefault();
auto factory = make_shared<FactorySimple>(loop);
auto on_tick = make_shared< OnTickSimple<JobList> >(job_list, factory, task_list);
factory->set_OnTick(on_tick);
for (size_t i = 1; i <= concurrency; i++)
{
<|file_sep|>updated/main.cpp
using namespace std;
int main(int argc, char *argv[])
{
const string task_fname = "task_list.txt";
const size_t concurrency = 2;
ifstream task_stream{task_fname};
if ( !task_stream.is_open() )
{
cout << "Can`t open <" << task_fname << ">, break." << endl;
return 1;
}
TaskListSimple task_list{task_stream, "./"};
JobList job_list;
auto loop = AIO_UVW::Loop::getDefault();
auto factory = make_shared<FactorySimple>(loop);
auto on_tick = make_shared< OnTickSimple<JobList> >(job_list, factory, task_list);
factory->set_OnTick(on_tick);
|
<|file_sep|>ouzel/android/WindowAndroid.cpp.diff
original:
updated:
#include "Engine.h"
#include "opengl/RendererOGL.h"
<|file_sep|>original/ouzel/android/WindowAndroid.cpp
#include "WindowAndroid.h"
namespace ouzel
{
WindowAndroid::WindowAndroid(const Size2& pSize, bool pResizable, bool pFullscreen, uint32_t pSampleCount, const std::string& pTitle):
Window(pSize, pResizable, pFullscreen, pSampleCount, pTitle)
{
}
WindowAndroid::~WindowAndroid()
{
}
bool WindowAndroid::init()
{
return Window::init();
}
}
<|file_sep|>current/ouzel/android/WindowAndroid.cpp
#include "Engine.h"
#include "opengl/RendererOGL.h"
namespace ouzel
{
WindowAndroid::WindowAndroid(const Size2& pSize, bool pResizable, bool pFullscreen, uint32_t pSampleCount, const std::string& pTitle):
Window(pSize, pResizable, pFullscreen, pSampleCount, pTitle)
{
}
WindowAndroid::~WindowAndroid()
{
}
bool WindowAndroid::init()
{
return Window::init();
}
}
<|file_sep|>updated/ouzel/android/WindowAndroid.cpp | {
WindowAndroid::WindowAndroid(const Size2& pSize, bool pResizable, bool pFullscreen, uint32_t pSampleCount, const std::string& pTitle):
Window(pSize, pResizable, pFullscreen, pSampleCount, pTitle)
{
}
WindowAndroid::~WindowAndroid()
{
}
bool WindowAndroid::init()
{
std::shared_ptr<graphics::RendererOGL> rendererOGL = std::static_pointer_cast<graphics::RendererOGL>(sharedEngine->getRenderer());
rendererOGL->setAPIVersion(2);
return Window::init();
}
} | ouzel/android/WindowAndroid.cpp | C++ | 40d965d75defd95662f70a3ed24d99ed7fa343aa | <|file_sep|>ouzel/android/WindowAndroid.cpp.diff
original:
updated:
#include "Engine.h"
#include "opengl/RendererOGL.h"
<|file_sep|>original/ouzel/android/WindowAndroid.cpp
#include "WindowAndroid.h"
namespace ouzel
{
WindowAndroid::WindowAndroid(const Size2& pSize, bool pResizable, bool pFullscreen, uint32_t pSampleCount, const std::string& pTitle):
Window(pSize, pResizable, pFullscreen, pSampleCount, pTitle)
{
}
WindowAndroid::~WindowAndroid()
{
}
bool WindowAndroid::init()
{
return Window::init();
}
}
<|file_sep|>current/ouzel/android/WindowAndroid.cpp
#include "Engine.h"
#include "opengl/RendererOGL.h"
namespace ouzel
{
WindowAndroid::WindowAndroid(const Size2& pSize, bool pResizable, bool pFullscreen, uint32_t pSampleCount, const std::string& pTitle):
Window(pSize, pResizable, pFullscreen, pSampleCount, pTitle)
{
}
WindowAndroid::~WindowAndroid()
{
}
bool WindowAndroid::init()
{
return Window::init();
}
}
<|file_sep|>updated/ouzel/android/WindowAndroid.cpp
{
WindowAndroid::WindowAndroid(const Size2& pSize, bool pResizable, bool pFullscreen, uint32_t pSampleCount, const std::string& pTitle):
Window(pSize, pResizable, pFullscreen, pSampleCount, pTitle)
{
}
WindowAndroid::~WindowAndroid()
{
}
bool WindowAndroid::init()
{
std::shared_ptr<graphics::RendererOGL> rendererOGL = std::static_pointer_cast<graphics::RendererOGL>(sharedEngine->getRenderer());
rendererOGL->setAPIVersion(2);
return Window::init();
}
} |
<|file_sep|>PlasMOUL/Messages/SimulationMsg.cpp.diff
original:
updated:
MOUL::Message::read(stream);
<|file_sep|>original/PlasMOUL/Messages/SimulationMsg.cpp
* *
* dirtsand is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Affero General Public License for more details. *
* *
* You should have received a copy of the GNU Affero General Public License *
* along with dirtsand. If not, see <http://www.gnu.org/licenses/>. *
******************************************************************************/
#include "SimulationMsg.h"
void MOUL::SubWorldMsg::read(DS::Stream* stream)
{
m_world.read(stream);
}
void MOUL::SubWorldMsg::write(DS::Stream* stream) const
{
m_world.write(stream);
}
<|file_sep|>current/PlasMOUL/Messages/SimulationMsg.cpp
* dirtsand is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Affero General Public License for more details. *
* *
* You should have received a copy of the GNU Affero General Public License *
* along with dirtsand. If not, see <http://www.gnu.org/licenses/>. *
******************************************************************************/
#include "SimulationMsg.h"
void MOUL::SubWorldMsg::read(DS::Stream* stream)
{
MOUL::Message::read(stream);
m_world.read(stream);
}
void MOUL::SubWorldMsg::write(DS::Stream* stream) const
{
m_world.write(stream);
}
<|file_sep|>updated/PlasMOUL/Messages/SimulationMsg.cpp | * but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Affero General Public License for more details. *
* *
* You should have received a copy of the GNU Affero General Public License *
* along with dirtsand. If not, see <http://www.gnu.org/licenses/>. *
******************************************************************************/
#include "SimulationMsg.h"
void MOUL::SubWorldMsg::read(DS::Stream* stream)
{
MOUL::Message::read(stream);
m_world.read(stream);
}
void MOUL::SubWorldMsg::write(DS::Stream* stream) const
{
MOUL::Message::write(stream);
m_world.write(stream);
} | PlasMOUL/Messages/SimulationMsg.cpp | C++ | a7b06e5ad2147752b7e0a82c0c37778c72def66e | <|file_sep|>PlasMOUL/Messages/SimulationMsg.cpp.diff
original:
updated:
MOUL::Message::read(stream);
<|file_sep|>original/PlasMOUL/Messages/SimulationMsg.cpp
* *
* dirtsand is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Affero General Public License for more details. *
* *
* You should have received a copy of the GNU Affero General Public License *
* along with dirtsand. If not, see <http://www.gnu.org/licenses/>. *
******************************************************************************/
#include "SimulationMsg.h"
void MOUL::SubWorldMsg::read(DS::Stream* stream)
{
m_world.read(stream);
}
void MOUL::SubWorldMsg::write(DS::Stream* stream) const
{
m_world.write(stream);
}
<|file_sep|>current/PlasMOUL/Messages/SimulationMsg.cpp
* dirtsand is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Affero General Public License for more details. *
* *
* You should have received a copy of the GNU Affero General Public License *
* along with dirtsand. If not, see <http://www.gnu.org/licenses/>. *
******************************************************************************/
#include "SimulationMsg.h"
void MOUL::SubWorldMsg::read(DS::Stream* stream)
{
MOUL::Message::read(stream);
m_world.read(stream);
}
void MOUL::SubWorldMsg::write(DS::Stream* stream) const
{
m_world.write(stream);
}
<|file_sep|>updated/PlasMOUL/Messages/SimulationMsg.cpp
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Affero General Public License for more details. *
* *
* You should have received a copy of the GNU Affero General Public License *
* along with dirtsand. If not, see <http://www.gnu.org/licenses/>. *
******************************************************************************/
#include "SimulationMsg.h"
void MOUL::SubWorldMsg::read(DS::Stream* stream)
{
MOUL::Message::read(stream);
m_world.read(stream);
}
void MOUL::SubWorldMsg::write(DS::Stream* stream) const
{
MOUL::Message::write(stream);
m_world.write(stream);
} |
<|file_sep|>server/analyzer.cpp.diff
original:
updated:
DLOG(INFO) << "Starting analysis " << name;
DLOG(INFO) << "Getting facts for " << name;
<|file_sep|>server/analyzer.cpp.diff
original:
updated:
DLOG(INFO) << "Got facts for " << name;
<|file_sep|>original/server/analyzer.cpp
auto dfs = res.getDerived();
bool dirty = false;
if (dal->setFacts(dfs) != 0) {
dirty = true;
}
cache.add(ctx);
return dirty;
});
}
return kj::Promise<bool>(false);
};
return kj::joinPromises(kj::mv(analResults)).then([this](kj::Array<bool> x){
bool dirty = false;
for (auto v : x) {
dirty |= v;
}
return dirty;
});
}
}
<|file_sep|>current/server/analyzer.cpp
auto dfs = res.getDerived();
bool dirty = false;
if (dal->setFacts(dfs) != 0) {
dirty = true;
}
cache.add(ctx);
return dirty;
});
}
return kj::Promise<bool>(false);
};
return kj::joinPromises(kj::mv(analResults)).then([this](kj::Array<bool> x){
bool dirty = false;
for (auto v : x) {
dirty |= v;
}
return dirty;
});
}
}
<|file_sep|>updated/server/analyzer.cpp | bool dirty = false;
if (dal->setFacts(dfs) != 0) {
dirty = true;
}
cache.add(ctx);
return dirty;
});
}
return kj::Promise<bool>(false);
};
return kj::joinPromises(kj::mv(analResults)).then([this](kj::Array<bool> x){
bool dirty = false;
for (auto v : x) {
dirty |= v;
}
DLOG(INFO) << "Finished analysis " << name;
return dirty;
});
}
} | server/analyzer.cpp | C++ | cbb0fd9cff4a5b73f3b2498e4ca21831892c723e | <|file_sep|>server/analyzer.cpp.diff
original:
updated:
DLOG(INFO) << "Starting analysis " << name;
DLOG(INFO) << "Getting facts for " << name;
<|file_sep|>server/analyzer.cpp.diff
original:
updated:
DLOG(INFO) << "Got facts for " << name;
<|file_sep|>original/server/analyzer.cpp
auto dfs = res.getDerived();
bool dirty = false;
if (dal->setFacts(dfs) != 0) {
dirty = true;
}
cache.add(ctx);
return dirty;
});
}
return kj::Promise<bool>(false);
};
return kj::joinPromises(kj::mv(analResults)).then([this](kj::Array<bool> x){
bool dirty = false;
for (auto v : x) {
dirty |= v;
}
return dirty;
});
}
}
<|file_sep|>current/server/analyzer.cpp
auto dfs = res.getDerived();
bool dirty = false;
if (dal->setFacts(dfs) != 0) {
dirty = true;
}
cache.add(ctx);
return dirty;
});
}
return kj::Promise<bool>(false);
};
return kj::joinPromises(kj::mv(analResults)).then([this](kj::Array<bool> x){
bool dirty = false;
for (auto v : x) {
dirty |= v;
}
return dirty;
});
}
}
<|file_sep|>updated/server/analyzer.cpp
bool dirty = false;
if (dal->setFacts(dfs) != 0) {
dirty = true;
}
cache.add(ctx);
return dirty;
});
}
return kj::Promise<bool>(false);
};
return kj::joinPromises(kj::mv(analResults)).then([this](kj::Array<bool> x){
bool dirty = false;
for (auto v : x) {
dirty |= v;
}
DLOG(INFO) << "Finished analysis " << name;
return dirty;
});
}
} |
<|file_sep|>src/gtest/main.cpp.diff
original:
updated:
#include "sodium.h"
<|file_sep|>original/src/gtest/main.cpp
#include "gtest/gtest.h"
int main(int argc, char **argv) {
testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
}
<|file_sep|>current/src/gtest/main.cpp
#include "gtest/gtest.h"
#include "sodium.h"
int main(int argc, char **argv) {
testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
}
<|file_sep|>updated/src/gtest/main.cpp | #include "gtest/gtest.h"
#include "sodium.h"
int main(int argc, char **argv) {
assert(sodium_init() != -1);
testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
} | src/gtest/main.cpp | C++ | c75d6bd0fad60e1ab6421b481d5eb575f4a5ce3e | <|file_sep|>src/gtest/main.cpp.diff
original:
updated:
#include "sodium.h"
<|file_sep|>original/src/gtest/main.cpp
#include "gtest/gtest.h"
int main(int argc, char **argv) {
testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
}
<|file_sep|>current/src/gtest/main.cpp
#include "gtest/gtest.h"
#include "sodium.h"
int main(int argc, char **argv) {
testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
}
<|file_sep|>updated/src/gtest/main.cpp
#include "gtest/gtest.h"
#include "sodium.h"
int main(int argc, char **argv) {
assert(sodium_init() != -1);
testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
} |
<|file_sep|>windows/src/InitialExperience/SdkModel/WindowsInitialExperienceModule.cpp.diff
original:
updated:
#include "WorldPinVisibility.h"
<|file_sep|>original/windows/src/InitialExperience/SdkModel/WindowsInitialExperienceModule.cpp
//, m_pInitialExperienceSearchResultAttractModeModule(NULL)
{
}
WindowsInitialExperienceModule::~WindowsInitialExperienceModule()
{
//Eegeo_DELETE m_pInitialExperienceSearchResultAttractModeModule;
}
std::vector<IInitialExperienceStep*> WindowsInitialExperienceModule::CreateSteps(WorldAreaLoader::SdkModel::IWorldAreaLoaderModel &worldAreaLoaderModel)
{
std::vector<IInitialExperienceStep*> steps;
// TODO: Recreate MEA initial experience steps for windows...
return steps;
}
}
}
}
<|file_sep|>current/windows/src/InitialExperience/SdkModel/WindowsInitialExperienceModule.cpp
//, m_pInitialExperienceSearchResultAttractModeModule(NULL)
{
}
WindowsInitialExperienceModule::~WindowsInitialExperienceModule()
{
//Eegeo_DELETE m_pInitialExperienceSearchResultAttractModeModule;
}
std::vector<IInitialExperienceStep*> WindowsInitialExperienceModule::CreateSteps(WorldAreaLoader::SdkModel::IWorldAreaLoaderModel &worldAreaLoaderModel)
{
std::vector<IInitialExperienceStep*> steps;
// TODO: Recreate MEA initial experience steps for windows...
return steps;
}
}
}
}
<|file_sep|>updated/windows/src/InitialExperience/SdkModel/WindowsInitialExperienceModule.cpp |
}
WindowsInitialExperienceModule::~WindowsInitialExperienceModule()
{
//Eegeo_DELETE m_pInitialExperienceSearchResultAttractModeModule;
}
std::vector<IInitialExperienceStep*> WindowsInitialExperienceModule::CreateSteps(WorldAreaLoader::SdkModel::IWorldAreaLoaderModel &worldAreaLoaderModel)
{
std::vector<IInitialExperienceStep*> steps;
// TODO: Recreate MEA initial experience steps for windows...
m_messageBus.Publish(WorldPins::WorldPinsVisibilityMessage(WorldPins::SdkModel::WorldPinVisibility::All));
return steps;
}
}
}
} | windows/src/InitialExperience/SdkModel/WindowsInitialExperienceModule.cpp | C++ | 7b91b2c561c2cfbd28e465a29837db272a6b5137 | <|file_sep|>windows/src/InitialExperience/SdkModel/WindowsInitialExperienceModule.cpp.diff
original:
updated:
#include "WorldPinVisibility.h"
<|file_sep|>original/windows/src/InitialExperience/SdkModel/WindowsInitialExperienceModule.cpp
//, m_pInitialExperienceSearchResultAttractModeModule(NULL)
{
}
WindowsInitialExperienceModule::~WindowsInitialExperienceModule()
{
//Eegeo_DELETE m_pInitialExperienceSearchResultAttractModeModule;
}
std::vector<IInitialExperienceStep*> WindowsInitialExperienceModule::CreateSteps(WorldAreaLoader::SdkModel::IWorldAreaLoaderModel &worldAreaLoaderModel)
{
std::vector<IInitialExperienceStep*> steps;
// TODO: Recreate MEA initial experience steps for windows...
return steps;
}
}
}
}
<|file_sep|>current/windows/src/InitialExperience/SdkModel/WindowsInitialExperienceModule.cpp
//, m_pInitialExperienceSearchResultAttractModeModule(NULL)
{
}
WindowsInitialExperienceModule::~WindowsInitialExperienceModule()
{
//Eegeo_DELETE m_pInitialExperienceSearchResultAttractModeModule;
}
std::vector<IInitialExperienceStep*> WindowsInitialExperienceModule::CreateSteps(WorldAreaLoader::SdkModel::IWorldAreaLoaderModel &worldAreaLoaderModel)
{
std::vector<IInitialExperienceStep*> steps;
// TODO: Recreate MEA initial experience steps for windows...
return steps;
}
}
}
}
<|file_sep|>updated/windows/src/InitialExperience/SdkModel/WindowsInitialExperienceModule.cpp
}
WindowsInitialExperienceModule::~WindowsInitialExperienceModule()
{
//Eegeo_DELETE m_pInitialExperienceSearchResultAttractModeModule;
}
std::vector<IInitialExperienceStep*> WindowsInitialExperienceModule::CreateSteps(WorldAreaLoader::SdkModel::IWorldAreaLoaderModel &worldAreaLoaderModel)
{
std::vector<IInitialExperienceStep*> steps;
// TODO: Recreate MEA initial experience steps for windows...
m_messageBus.Publish(WorldPins::WorldPinsVisibilityMessage(WorldPins::SdkModel::WorldPinVisibility::All));
return steps;
}
}
}
} |
<|file_sep|>media/base/run_all_unittests.cc.diff
original:
updated:
#include "base/test/main_hook.h"
<|file_sep|>original/media/base/run_all_unittests.cc
#include "media/base/media.h"
class TestSuiteNoAtExit : public base::TestSuite {
public:
TestSuiteNoAtExit(int argc, char** argv) : TestSuite(argc, argv) {}
virtual ~TestSuiteNoAtExit() {}
protected:
virtual void Initialize();
};
void TestSuiteNoAtExit::Initialize() {
// Run TestSuite::Initialize first so that logging is initialized.
base::TestSuite::Initialize();
// Run this here instead of main() to ensure an AtExitManager is already
// present.
media::InitializeMediaLibraryForTesting();
}
int main(int argc, char** argv) {
return TestSuiteNoAtExit(argc, argv).Run();
}
<|file_sep|>current/media/base/run_all_unittests.cc
#include "media/base/media.h"
class TestSuiteNoAtExit : public base::TestSuite {
public:
TestSuiteNoAtExit(int argc, char** argv) : TestSuite(argc, argv) {}
virtual ~TestSuiteNoAtExit() {}
protected:
virtual void Initialize();
};
void TestSuiteNoAtExit::Initialize() {
// Run TestSuite::Initialize first so that logging is initialized.
base::TestSuite::Initialize();
// Run this here instead of main() to ensure an AtExitManager is already
// present.
media::InitializeMediaLibraryForTesting();
}
int main(int argc, char** argv) {
return TestSuiteNoAtExit(argc, argv).Run();
}
<|file_sep|>updated/media/base/run_all_unittests.cc |
class TestSuiteNoAtExit : public base::TestSuite {
public:
TestSuiteNoAtExit(int argc, char** argv) : TestSuite(argc, argv) {}
virtual ~TestSuiteNoAtExit() {}
protected:
virtual void Initialize();
};
void TestSuiteNoAtExit::Initialize() {
// Run TestSuite::Initialize first so that logging is initialized.
base::TestSuite::Initialize();
// Run this here instead of main() to ensure an AtExitManager is already
// present.
media::InitializeMediaLibraryForTesting();
}
int main(int argc, char** argv) {
MainHook hook(main, argc, argv);
return TestSuiteNoAtExit(argc, argv).Run();
} | media/base/run_all_unittests.cc | C++ | 88281950eed0e9fadba9d13fc68707068b5b5628 | <|file_sep|>media/base/run_all_unittests.cc.diff
original:
updated:
#include "base/test/main_hook.h"
<|file_sep|>original/media/base/run_all_unittests.cc
#include "media/base/media.h"
class TestSuiteNoAtExit : public base::TestSuite {
public:
TestSuiteNoAtExit(int argc, char** argv) : TestSuite(argc, argv) {}
virtual ~TestSuiteNoAtExit() {}
protected:
virtual void Initialize();
};
void TestSuiteNoAtExit::Initialize() {
// Run TestSuite::Initialize first so that logging is initialized.
base::TestSuite::Initialize();
// Run this here instead of main() to ensure an AtExitManager is already
// present.
media::InitializeMediaLibraryForTesting();
}
int main(int argc, char** argv) {
return TestSuiteNoAtExit(argc, argv).Run();
}
<|file_sep|>current/media/base/run_all_unittests.cc
#include "media/base/media.h"
class TestSuiteNoAtExit : public base::TestSuite {
public:
TestSuiteNoAtExit(int argc, char** argv) : TestSuite(argc, argv) {}
virtual ~TestSuiteNoAtExit() {}
protected:
virtual void Initialize();
};
void TestSuiteNoAtExit::Initialize() {
// Run TestSuite::Initialize first so that logging is initialized.
base::TestSuite::Initialize();
// Run this here instead of main() to ensure an AtExitManager is already
// present.
media::InitializeMediaLibraryForTesting();
}
int main(int argc, char** argv) {
return TestSuiteNoAtExit(argc, argv).Run();
}
<|file_sep|>updated/media/base/run_all_unittests.cc
class TestSuiteNoAtExit : public base::TestSuite {
public:
TestSuiteNoAtExit(int argc, char** argv) : TestSuite(argc, argv) {}
virtual ~TestSuiteNoAtExit() {}
protected:
virtual void Initialize();
};
void TestSuiteNoAtExit::Initialize() {
// Run TestSuite::Initialize first so that logging is initialized.
base::TestSuite::Initialize();
// Run this here instead of main() to ensure an AtExitManager is already
// present.
media::InitializeMediaLibraryForTesting();
}
int main(int argc, char** argv) {
MainHook hook(main, argc, argv);
return TestSuiteNoAtExit(argc, argv).Run();
} |
<|file_sep|>Day2/Day2.cpp.diff
original:
updated:
uint64_t Ribbon = 0;
<|file_sep|>Day2/Day2.cpp.diff
original:
updated:
uint32_t LargestDimension = std::max({ l, w, h });
<|file_sep|>Day2/Day2.cpp.diff
original:
updated:
Ribbon += l * w * h + 2 * l + 2 * w + 2 * h - 2 * LargestDimension;
<|file_sep|>original/Day2/Day2.cpp
LineStream.get();
LineStream >> w;
uint32_t Side1 = l * w;
uint32_t Side2 = h * w;
uint32_t Side3 = l * h;
uint32_t SmallestSide = std::min({ Side1, Side2, Side3 });
WrappingPaper += SmallestSide + 2 * Side1 + 2 * Side2 + 2 * Side3;
}
Input.close();
std::cout << "Wrapping Paper: " << WrappingPaper << std::endl;
system("pause");
return 0;
}
<|file_sep|>current/Day2/Day2.cpp
uint32_t Side1 = l * w;
uint32_t Side2 = h * w;
uint32_t Side3 = l * h;
uint32_t SmallestSide = std::min({ Side1, Side2, Side3 });
uint32_t LargestDimension = std::max({ l, w, h });
WrappingPaper += SmallestSide + 2 * Side1 + 2 * Side2 + 2 * Side3;
Ribbon += l * w * h + 2 * l + 2 * w + 2 * h - 2 * LargestDimension;
}
Input.close();
std::cout << "Wrapping Paper: " << WrappingPaper << std::endl;
system("pause");
return 0;
}
<|file_sep|>updated/Day2/Day2.cpp | uint32_t Side1 = l * w;
uint32_t Side2 = h * w;
uint32_t Side3 = l * h;
uint32_t SmallestSide = std::min({ Side1, Side2, Side3 });
uint32_t LargestDimension = std::max({ l, w, h });
WrappingPaper += SmallestSide + 2 * Side1 + 2 * Side2 + 2 * Side3;
Ribbon += l * w * h + 2 * l + 2 * w + 2 * h - 2 * LargestDimension;
}
Input.close();
std::cout << "Wrapping Paper: " << WrappingPaper << std::endl;
std::cout << "Ribbon: " << Ribbon << std::endl;
system("pause");
return 0;
}
| Day2/Day2.cpp | C++ | 16e678cc1869afdcffa0adffadfa4d6ce7b78d20 | <|file_sep|>Day2/Day2.cpp.diff
original:
updated:
uint64_t Ribbon = 0;
<|file_sep|>Day2/Day2.cpp.diff
original:
updated:
uint32_t LargestDimension = std::max({ l, w, h });
<|file_sep|>Day2/Day2.cpp.diff
original:
updated:
Ribbon += l * w * h + 2 * l + 2 * w + 2 * h - 2 * LargestDimension;
<|file_sep|>original/Day2/Day2.cpp
LineStream.get();
LineStream >> w;
uint32_t Side1 = l * w;
uint32_t Side2 = h * w;
uint32_t Side3 = l * h;
uint32_t SmallestSide = std::min({ Side1, Side2, Side3 });
WrappingPaper += SmallestSide + 2 * Side1 + 2 * Side2 + 2 * Side3;
}
Input.close();
std::cout << "Wrapping Paper: " << WrappingPaper << std::endl;
system("pause");
return 0;
}
<|file_sep|>current/Day2/Day2.cpp
uint32_t Side1 = l * w;
uint32_t Side2 = h * w;
uint32_t Side3 = l * h;
uint32_t SmallestSide = std::min({ Side1, Side2, Side3 });
uint32_t LargestDimension = std::max({ l, w, h });
WrappingPaper += SmallestSide + 2 * Side1 + 2 * Side2 + 2 * Side3;
Ribbon += l * w * h + 2 * l + 2 * w + 2 * h - 2 * LargestDimension;
}
Input.close();
std::cout << "Wrapping Paper: " << WrappingPaper << std::endl;
system("pause");
return 0;
}
<|file_sep|>updated/Day2/Day2.cpp
uint32_t Side1 = l * w;
uint32_t Side2 = h * w;
uint32_t Side3 = l * h;
uint32_t SmallestSide = std::min({ Side1, Side2, Side3 });
uint32_t LargestDimension = std::max({ l, w, h });
WrappingPaper += SmallestSide + 2 * Side1 + 2 * Side2 + 2 * Side3;
Ribbon += l * w * h + 2 * l + 2 * w + 2 * h - 2 * LargestDimension;
}
Input.close();
std::cout << "Wrapping Paper: " << WrappingPaper << std::endl;
std::cout << "Ribbon: " << Ribbon << std::endl;
system("pause");
return 0;
}
|
<|file_sep|>testing/test_single_agent_async_execute.cpp.diff
original:
updated:
assert(exec.valid());
<|file_sep|>original/testing/test_single_agent_async_execute.cpp
// returning int
executor_type exec;
auto f = agency::new_executor_traits<executor_type>::async_execute(exec, []
{
return 13;
});
assert(f.get() == 13);
}
}
int main()
{
using namespace test_executors;
test<empty_executor>();
test<single_agent_when_all_execute_and_select_executor>();
test<multi_agent_when_all_execute_and_select_executor>();
test<single_agent_then_execute_executor>();
<|file_sep|>current/testing/test_single_agent_async_execute.cpp
{
// returning int
executor_type exec;
auto f = agency::new_executor_traits<executor_type>::async_execute(exec, []
{
return 13;
});
assert(f.get() == 13);
}
}
int main()
{
using namespace test_executors;
test<empty_executor>();
test<single_agent_when_all_execute_and_select_executor>();
test<multi_agent_when_all_execute_and_select_executor>();
<|file_sep|>updated/testing/test_single_agent_async_execute.cpp | // returning int
executor_type exec;
auto f = agency::new_executor_traits<executor_type>::async_execute(exec, []
{
return 13;
});
assert(f.get() == 13);
assert(exec.valid());
}
}
int main()
{
using namespace test_executors;
test<empty_executor>();
test<single_agent_when_all_execute_and_select_executor>();
test<multi_agent_when_all_execute_and_select_executor>(); | testing/test_single_agent_async_execute.cpp | C++ | 0fa689e5f7c4164088f9a3d474da286f0250a81c | <|file_sep|>testing/test_single_agent_async_execute.cpp.diff
original:
updated:
assert(exec.valid());
<|file_sep|>original/testing/test_single_agent_async_execute.cpp
// returning int
executor_type exec;
auto f = agency::new_executor_traits<executor_type>::async_execute(exec, []
{
return 13;
});
assert(f.get() == 13);
}
}
int main()
{
using namespace test_executors;
test<empty_executor>();
test<single_agent_when_all_execute_and_select_executor>();
test<multi_agent_when_all_execute_and_select_executor>();
test<single_agent_then_execute_executor>();
<|file_sep|>current/testing/test_single_agent_async_execute.cpp
{
// returning int
executor_type exec;
auto f = agency::new_executor_traits<executor_type>::async_execute(exec, []
{
return 13;
});
assert(f.get() == 13);
}
}
int main()
{
using namespace test_executors;
test<empty_executor>();
test<single_agent_when_all_execute_and_select_executor>();
test<multi_agent_when_all_execute_and_select_executor>();
<|file_sep|>updated/testing/test_single_agent_async_execute.cpp
// returning int
executor_type exec;
auto f = agency::new_executor_traits<executor_type>::async_execute(exec, []
{
return 13;
});
assert(f.get() == 13);
assert(exec.valid());
}
}
int main()
{
using namespace test_executors;
test<empty_executor>();
test<single_agent_when_all_execute_and_select_executor>();
test<multi_agent_when_all_execute_and_select_executor>(); |
<|file_sep|>config.tests/sensord/main.cpp.diff
original:
updated:
#include <abstractsensor.h>
#include <abstractsensor_i.h>
<|file_sep|>original/config.tests/sensord/main.cpp
#include <sensormanagerinterface.h>
#include <datatypes/magneticfield.h>
int main()
{
SensorManagerInterface* m_remoteSensorManager;
m_remoteSensorManager = &SensorManagerInterface::instance();
return 0;
}
<|file_sep|>current/config.tests/sensord/main.cpp
#include <sensormanagerinterface.h>
#include <datatypes/magneticfield.h>
#include <abstractsensor.h>
#include <abstractsensor_i.h>
int main()
{
SensorManagerInterface* m_remoteSensorManager;
m_remoteSensorManager = &SensorManagerInterface::instance();
return 0;
}
<|file_sep|>updated/config.tests/sensord/main.cpp | #include <sensormanagerinterface.h>
#include <datatypes/magneticfield.h>
#include <abstractsensor.h>
#include <abstractsensor_i.h>
int main()
{
SensorManagerInterface* m_remoteSensorManager;
m_remoteSensorManager = &SensorManagerInterface::instance();
QList<DataRange> (AbstractSensorChannelInterface::*func)() = &AbstractSensorChannelInterface::getAvailableIntervals;
return 0;
}
| config.tests/sensord/main.cpp | C++ | a2a02703e2f3b3bb26081b605af62ac7309562a2 | <|file_sep|>config.tests/sensord/main.cpp.diff
original:
updated:
#include <abstractsensor.h>
#include <abstractsensor_i.h>
<|file_sep|>original/config.tests/sensord/main.cpp
#include <sensormanagerinterface.h>
#include <datatypes/magneticfield.h>
int main()
{
SensorManagerInterface* m_remoteSensorManager;
m_remoteSensorManager = &SensorManagerInterface::instance();
return 0;
}
<|file_sep|>current/config.tests/sensord/main.cpp
#include <sensormanagerinterface.h>
#include <datatypes/magneticfield.h>
#include <abstractsensor.h>
#include <abstractsensor_i.h>
int main()
{
SensorManagerInterface* m_remoteSensorManager;
m_remoteSensorManager = &SensorManagerInterface::instance();
return 0;
}
<|file_sep|>updated/config.tests/sensord/main.cpp
#include <sensormanagerinterface.h>
#include <datatypes/magneticfield.h>
#include <abstractsensor.h>
#include <abstractsensor_i.h>
int main()
{
SensorManagerInterface* m_remoteSensorManager;
m_remoteSensorManager = &SensorManagerInterface::instance();
QList<DataRange> (AbstractSensorChannelInterface::*func)() = &AbstractSensorChannelInterface::getAvailableIntervals;
return 0;
}
|
<|file_sep|>src/test/fuzz/kitchen_sink.cpp.diff
original:
updated:
#include <rpc/util.h>
<|file_sep|>original/src/test/fuzz/kitchen_sink.cpp
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <test/fuzz/FuzzedDataProvider.h>
#include <test/fuzz/fuzz.h>
#include <test/fuzz/util.h>
#include <util/error.h>
#include <cstdint>
#include <vector>
// The fuzzing kitchen sink: Fuzzing harness for functions that need to be
// fuzzed but a.) don't belong in any existing fuzzing harness file, and
// b.) are not important enough to warrant their own fuzzing harness file.
void test_one_input(const std::vector<uint8_t>& buffer)
{
FuzzedDataProvider fuzzed_data_provider(buffer.data(), buffer.size());
const TransactionError transaction_error = fuzzed_data_provider.PickValueInArray<TransactionError>({TransactionError::OK, TransactionError::MISSING_INPUTS, TransactionError::ALREADY_IN_CHAIN, TransactionError::P2P_DISABLED, TransactionError::MEMPOOL_REJECTED, TransactionError::MEMPOOL_ERROR, TransactionError::INVALID_PSBT, TransactionError::PSBT_MISMATCH, TransactionError::SIGHASH_MISMATCH, TransactionError::MAX_FEE_EXCEEDED});
(void)TransactionErrorString(transaction_error);
}
<|file_sep|>current/src/test/fuzz/kitchen_sink.cpp
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <rpc/util.h>
#include <test/fuzz/FuzzedDataProvider.h>
#include <test/fuzz/fuzz.h>
#include <test/fuzz/util.h>
#include <util/error.h>
#include <cstdint>
#include <vector>
// The fuzzing kitchen sink: Fuzzing harness for functions that need to be
// fuzzed but a.) don't belong in any existing fuzzing harness file, and
// b.) are not important enough to warrant their own fuzzing harness file.
void test_one_input(const std::vector<uint8_t>& buffer)
{
FuzzedDataProvider fuzzed_data_provider(buffer.data(), buffer.size());
const TransactionError transaction_error = fuzzed_data_provider.PickValueInArray<TransactionError>({TransactionError::OK, TransactionError::MISSING_INPUTS, TransactionError::ALREADY_IN_CHAIN, TransactionError::P2P_DISABLED, TransactionError::MEMPOOL_REJECTED, TransactionError::MEMPOOL_ERROR, TransactionError::INVALID_PSBT, TransactionError::PSBT_MISMATCH, TransactionError::SIGHASH_MISMATCH, TransactionError::MAX_FEE_EXCEEDED});
(void)TransactionErrorString(transaction_error);
}
<|file_sep|>updated/src/test/fuzz/kitchen_sink.cpp | #include <rpc/util.h>
#include <test/fuzz/FuzzedDataProvider.h>
#include <test/fuzz/fuzz.h>
#include <test/fuzz/util.h>
#include <util/error.h>
#include <cstdint>
#include <vector>
// The fuzzing kitchen sink: Fuzzing harness for functions that need to be
// fuzzed but a.) don't belong in any existing fuzzing harness file, and
// b.) are not important enough to warrant their own fuzzing harness file.
void test_one_input(const std::vector<uint8_t>& buffer)
{
FuzzedDataProvider fuzzed_data_provider(buffer.data(), buffer.size());
const TransactionError transaction_error = fuzzed_data_provider.PickValueInArray<TransactionError>({TransactionError::OK, TransactionError::MISSING_INPUTS, TransactionError::ALREADY_IN_CHAIN, TransactionError::P2P_DISABLED, TransactionError::MEMPOOL_REJECTED, TransactionError::MEMPOOL_ERROR, TransactionError::INVALID_PSBT, TransactionError::PSBT_MISMATCH, TransactionError::SIGHASH_MISMATCH, TransactionError::MAX_FEE_EXCEEDED});
(void)JSONRPCTransactionError(transaction_error);
(void)RPCErrorFromTransactionError(transaction_error);
(void)TransactionErrorString(transaction_error);
} | src/test/fuzz/kitchen_sink.cpp | C++ | e1e181fad1a73e9dee38a2bd74518e1b8d446930 | <|file_sep|>src/test/fuzz/kitchen_sink.cpp.diff
original:
updated:
#include <rpc/util.h>
<|file_sep|>original/src/test/fuzz/kitchen_sink.cpp
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <test/fuzz/FuzzedDataProvider.h>
#include <test/fuzz/fuzz.h>
#include <test/fuzz/util.h>
#include <util/error.h>
#include <cstdint>
#include <vector>
// The fuzzing kitchen sink: Fuzzing harness for functions that need to be
// fuzzed but a.) don't belong in any existing fuzzing harness file, and
// b.) are not important enough to warrant their own fuzzing harness file.
void test_one_input(const std::vector<uint8_t>& buffer)
{
FuzzedDataProvider fuzzed_data_provider(buffer.data(), buffer.size());
const TransactionError transaction_error = fuzzed_data_provider.PickValueInArray<TransactionError>({TransactionError::OK, TransactionError::MISSING_INPUTS, TransactionError::ALREADY_IN_CHAIN, TransactionError::P2P_DISABLED, TransactionError::MEMPOOL_REJECTED, TransactionError::MEMPOOL_ERROR, TransactionError::INVALID_PSBT, TransactionError::PSBT_MISMATCH, TransactionError::SIGHASH_MISMATCH, TransactionError::MAX_FEE_EXCEEDED});
(void)TransactionErrorString(transaction_error);
}
<|file_sep|>current/src/test/fuzz/kitchen_sink.cpp
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <rpc/util.h>
#include <test/fuzz/FuzzedDataProvider.h>
#include <test/fuzz/fuzz.h>
#include <test/fuzz/util.h>
#include <util/error.h>
#include <cstdint>
#include <vector>
// The fuzzing kitchen sink: Fuzzing harness for functions that need to be
// fuzzed but a.) don't belong in any existing fuzzing harness file, and
// b.) are not important enough to warrant their own fuzzing harness file.
void test_one_input(const std::vector<uint8_t>& buffer)
{
FuzzedDataProvider fuzzed_data_provider(buffer.data(), buffer.size());
const TransactionError transaction_error = fuzzed_data_provider.PickValueInArray<TransactionError>({TransactionError::OK, TransactionError::MISSING_INPUTS, TransactionError::ALREADY_IN_CHAIN, TransactionError::P2P_DISABLED, TransactionError::MEMPOOL_REJECTED, TransactionError::MEMPOOL_ERROR, TransactionError::INVALID_PSBT, TransactionError::PSBT_MISMATCH, TransactionError::SIGHASH_MISMATCH, TransactionError::MAX_FEE_EXCEEDED});
(void)TransactionErrorString(transaction_error);
}
<|file_sep|>updated/src/test/fuzz/kitchen_sink.cpp
#include <rpc/util.h>
#include <test/fuzz/FuzzedDataProvider.h>
#include <test/fuzz/fuzz.h>
#include <test/fuzz/util.h>
#include <util/error.h>
#include <cstdint>
#include <vector>
// The fuzzing kitchen sink: Fuzzing harness for functions that need to be
// fuzzed but a.) don't belong in any existing fuzzing harness file, and
// b.) are not important enough to warrant their own fuzzing harness file.
void test_one_input(const std::vector<uint8_t>& buffer)
{
FuzzedDataProvider fuzzed_data_provider(buffer.data(), buffer.size());
const TransactionError transaction_error = fuzzed_data_provider.PickValueInArray<TransactionError>({TransactionError::OK, TransactionError::MISSING_INPUTS, TransactionError::ALREADY_IN_CHAIN, TransactionError::P2P_DISABLED, TransactionError::MEMPOOL_REJECTED, TransactionError::MEMPOOL_ERROR, TransactionError::INVALID_PSBT, TransactionError::PSBT_MISMATCH, TransactionError::SIGHASH_MISMATCH, TransactionError::MAX_FEE_EXCEEDED});
(void)JSONRPCTransactionError(transaction_error);
(void)RPCErrorFromTransactionError(transaction_error);
(void)TransactionErrorString(transaction_error);
} |
<|file_sep|>Dev/Cpp/Viewer/Utils/Logger.cpp.diff
original:
updated:
#if defined(_WIN32)
<|file_sep|>original/Dev/Cpp/Viewer/Utils/Logger.cpp
#include "Logger.h"
#include <Effekseer.h>
#include <filesystem>
#include <spdlog/sinks/basic_file_sink.h>
#include <spdlog/spdlog.h>
namespace Effekseer::Tool
{
void Logger::SetFileLogger(const char16_t* path)
{
spdlog::flush_on(spdlog::level::trace);
spdlog::set_level(spdlog::level::trace);
spdlog::trace("Begin Native::SetFileLogger");
#if defined(_WIN32)
auto wpath = std::filesystem::path(reinterpret_cast<const wchar_t*>(path));
auto fileLogger = spdlog::basic_logger_mt("logger", wpath.generic_string().c_str());
#else
char cpath[512];
<|file_sep|>current/Dev/Cpp/Viewer/Utils/Logger.cpp
#include "Logger.h"
#include <Effekseer.h>
#if defined(_WIN32)
#include <filesystem>
#include <spdlog/sinks/basic_file_sink.h>
#include <spdlog/spdlog.h>
namespace Effekseer::Tool
{
void Logger::SetFileLogger(const char16_t* path)
{
spdlog::flush_on(spdlog::level::trace);
spdlog::set_level(spdlog::level::trace);
spdlog::trace("Begin Native::SetFileLogger");
#if defined(_WIN32)
auto wpath = std::filesystem::path(reinterpret_cast<const wchar_t*>(path));
auto fileLogger = spdlog::basic_logger_mt("logger", wpath.generic_string().c_str());
#else
<|file_sep|>updated/Dev/Cpp/Viewer/Utils/Logger.cpp | #include "Logger.h"
#include <Effekseer.h>
#if defined(_WIN32)
#include <filesystem>
#endif
#include <spdlog/sinks/basic_file_sink.h>
#include <spdlog/spdlog.h>
namespace Effekseer::Tool
{
void Logger::SetFileLogger(const char16_t* path)
{
spdlog::flush_on(spdlog::level::trace);
spdlog::set_level(spdlog::level::trace);
spdlog::trace("Begin Native::SetFileLogger");
#if defined(_WIN32)
auto wpath = std::filesystem::path(reinterpret_cast<const wchar_t*>(path));
auto fileLogger = spdlog::basic_logger_mt("logger", wpath.generic_string().c_str()); | Dev/Cpp/Viewer/Utils/Logger.cpp | C++ | ee8a72f09fcadaaccd8df5e72fbd6afd81271082 | <|file_sep|>Dev/Cpp/Viewer/Utils/Logger.cpp.diff
original:
updated:
#if defined(_WIN32)
<|file_sep|>original/Dev/Cpp/Viewer/Utils/Logger.cpp
#include "Logger.h"
#include <Effekseer.h>
#include <filesystem>
#include <spdlog/sinks/basic_file_sink.h>
#include <spdlog/spdlog.h>
namespace Effekseer::Tool
{
void Logger::SetFileLogger(const char16_t* path)
{
spdlog::flush_on(spdlog::level::trace);
spdlog::set_level(spdlog::level::trace);
spdlog::trace("Begin Native::SetFileLogger");
#if defined(_WIN32)
auto wpath = std::filesystem::path(reinterpret_cast<const wchar_t*>(path));
auto fileLogger = spdlog::basic_logger_mt("logger", wpath.generic_string().c_str());
#else
char cpath[512];
<|file_sep|>current/Dev/Cpp/Viewer/Utils/Logger.cpp
#include "Logger.h"
#include <Effekseer.h>
#if defined(_WIN32)
#include <filesystem>
#include <spdlog/sinks/basic_file_sink.h>
#include <spdlog/spdlog.h>
namespace Effekseer::Tool
{
void Logger::SetFileLogger(const char16_t* path)
{
spdlog::flush_on(spdlog::level::trace);
spdlog::set_level(spdlog::level::trace);
spdlog::trace("Begin Native::SetFileLogger");
#if defined(_WIN32)
auto wpath = std::filesystem::path(reinterpret_cast<const wchar_t*>(path));
auto fileLogger = spdlog::basic_logger_mt("logger", wpath.generic_string().c_str());
#else
<|file_sep|>updated/Dev/Cpp/Viewer/Utils/Logger.cpp
#include "Logger.h"
#include <Effekseer.h>
#if defined(_WIN32)
#include <filesystem>
#endif
#include <spdlog/sinks/basic_file_sink.h>
#include <spdlog/spdlog.h>
namespace Effekseer::Tool
{
void Logger::SetFileLogger(const char16_t* path)
{
spdlog::flush_on(spdlog::level::trace);
spdlog::set_level(spdlog::level::trace);
spdlog::trace("Begin Native::SetFileLogger");
#if defined(_WIN32)
auto wpath = std::filesystem::path(reinterpret_cast<const wchar_t*>(path));
auto fileLogger = spdlog::basic_logger_mt("logger", wpath.generic_string().c_str()); |
<|file_sep|>projects/OG-Language/ServiceTest/stdafx.cpp.diff
original:
updated:
#include "Service/Service.h"
<|file_sep|>original/projects/OG-Language/ServiceTest/stdafx.cpp
/**
* Copyright (C) 2011 - present by OpenGamma Inc. and the OpenGamma group of companies
*
* Please see distribution for license.
*/
#include "stdafx.h"
#ifndef __cplusplus_cli
int main (int argc, char **argv) {
CAbstractTest::Main (argc, argv);
return 0;
}
#endif /* ifndef __cplusplus_cli */
<|file_sep|>current/projects/OG-Language/ServiceTest/stdafx.cpp
/**
* Copyright (C) 2011 - present by OpenGamma Inc. and the OpenGamma group of companies
*
* Please see distribution for license.
*/
#include "stdafx.h"
#include "Service/Service.h"
#ifndef __cplusplus_cli
int main (int argc, char **argv) {
CAbstractTest::Main (argc, argv);
return 0;
}
#endif /* ifndef __cplusplus_cli */
<|file_sep|>updated/projects/OG-Language/ServiceTest/stdafx.cpp | /**
* Copyright (C) 2011 - present by OpenGamma Inc. and the OpenGamma group of companies
*
* Please see distribution for license.
*/
#include "stdafx.h"
#include "Service/Service.h"
#ifndef __cplusplus_cli
int main (int argc, char **argv) {
if ((argc == 3) && !strcmp (argv[1], "jvm")) {
return ServiceTestJVM (argv[2]) ? 0 : 1;
}
CAbstractTest::Main (argc, argv);
return 0;
}
#endif /* ifndef __cplusplus_cli */ | projects/OG-Language/ServiceTest/stdafx.cpp | C++ | 0bb6d9499b42be340d03106dd1360cb505625059 | <|file_sep|>projects/OG-Language/ServiceTest/stdafx.cpp.diff
original:
updated:
#include "Service/Service.h"
<|file_sep|>original/projects/OG-Language/ServiceTest/stdafx.cpp
/**
* Copyright (C) 2011 - present by OpenGamma Inc. and the OpenGamma group of companies
*
* Please see distribution for license.
*/
#include "stdafx.h"
#ifndef __cplusplus_cli
int main (int argc, char **argv) {
CAbstractTest::Main (argc, argv);
return 0;
}
#endif /* ifndef __cplusplus_cli */
<|file_sep|>current/projects/OG-Language/ServiceTest/stdafx.cpp
/**
* Copyright (C) 2011 - present by OpenGamma Inc. and the OpenGamma group of companies
*
* Please see distribution for license.
*/
#include "stdafx.h"
#include "Service/Service.h"
#ifndef __cplusplus_cli
int main (int argc, char **argv) {
CAbstractTest::Main (argc, argv);
return 0;
}
#endif /* ifndef __cplusplus_cli */
<|file_sep|>updated/projects/OG-Language/ServiceTest/stdafx.cpp
/**
* Copyright (C) 2011 - present by OpenGamma Inc. and the OpenGamma group of companies
*
* Please see distribution for license.
*/
#include "stdafx.h"
#include "Service/Service.h"
#ifndef __cplusplus_cli
int main (int argc, char **argv) {
if ((argc == 3) && !strcmp (argv[1], "jvm")) {
return ServiceTestJVM (argv[2]) ? 0 : 1;
}
CAbstractTest::Main (argc, argv);
return 0;
}
#endif /* ifndef __cplusplus_cli */ |
<|file_sep|>src/platform/qt/main.cpp.diff
original:
updated:
#ifdef BUILD_QT_MULTIMEDIA
<|file_sep|>original/src/platform/qt/main.cpp
/* Copyright (c) 2013-2014 Jeffrey Pfau
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "GBAApp.h"
#include "Window.h"
#ifdef QT_STATIC
#include <QtPlugin>
#ifdef _WIN32
Q_IMPORT_PLUGIN(QWindowsIntegrationPlugin);
Q_IMPORT_PLUGIN(QWindowsAudioPlugin);
#endif
#endif
int main(int argc, char* argv[]) {
QGBA::GBAApp application(argc, argv);
return application.exec();
}
<|file_sep|>current/src/platform/qt/main.cpp
/* Copyright (c) 2013-2014 Jeffrey Pfau
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "GBAApp.h"
#include "Window.h"
#ifdef QT_STATIC
#include <QtPlugin>
#ifdef _WIN32
Q_IMPORT_PLUGIN(QWindowsIntegrationPlugin);
#ifdef BUILD_QT_MULTIMEDIA
Q_IMPORT_PLUGIN(QWindowsAudioPlugin);
#endif
#endif
int main(int argc, char* argv[]) {
QGBA::GBAApp application(argc, argv);
return application.exec();
}
<|file_sep|>updated/src/platform/qt/main.cpp | *
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "GBAApp.h"
#include "Window.h"
#ifdef QT_STATIC
#include <QtPlugin>
#ifdef _WIN32
Q_IMPORT_PLUGIN(QWindowsIntegrationPlugin);
#ifdef BUILD_QT_MULTIMEDIA
Q_IMPORT_PLUGIN(QWindowsAudioPlugin);
#endif
#endif
#endif
int main(int argc, char* argv[]) {
QGBA::GBAApp application(argc, argv);
return application.exec();
} | src/platform/qt/main.cpp | C++ | 59f101eb496401f64933d27e365346d03ac8c0a8 | <|file_sep|>src/platform/qt/main.cpp.diff
original:
updated:
#ifdef BUILD_QT_MULTIMEDIA
<|file_sep|>original/src/platform/qt/main.cpp
/* Copyright (c) 2013-2014 Jeffrey Pfau
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "GBAApp.h"
#include "Window.h"
#ifdef QT_STATIC
#include <QtPlugin>
#ifdef _WIN32
Q_IMPORT_PLUGIN(QWindowsIntegrationPlugin);
Q_IMPORT_PLUGIN(QWindowsAudioPlugin);
#endif
#endif
int main(int argc, char* argv[]) {
QGBA::GBAApp application(argc, argv);
return application.exec();
}
<|file_sep|>current/src/platform/qt/main.cpp
/* Copyright (c) 2013-2014 Jeffrey Pfau
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "GBAApp.h"
#include "Window.h"
#ifdef QT_STATIC
#include <QtPlugin>
#ifdef _WIN32
Q_IMPORT_PLUGIN(QWindowsIntegrationPlugin);
#ifdef BUILD_QT_MULTIMEDIA
Q_IMPORT_PLUGIN(QWindowsAudioPlugin);
#endif
#endif
int main(int argc, char* argv[]) {
QGBA::GBAApp application(argc, argv);
return application.exec();
}
<|file_sep|>updated/src/platform/qt/main.cpp
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "GBAApp.h"
#include "Window.h"
#ifdef QT_STATIC
#include <QtPlugin>
#ifdef _WIN32
Q_IMPORT_PLUGIN(QWindowsIntegrationPlugin);
#ifdef BUILD_QT_MULTIMEDIA
Q_IMPORT_PLUGIN(QWindowsAudioPlugin);
#endif
#endif
#endif
int main(int argc, char* argv[]) {
QGBA::GBAApp application(argc, argv);
return application.exec();
} |
<|file_sep|>ui/message_center/message_center_util.cc.diff
original:
updated:
#if defined(OS_WIN) && defined(USE_AURA)
return false;
#else
<|file_sep|>original/ui/message_center/message_center_util.cc
// Copyright (c) 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "ui/message_center/message_center_util.h"
#include "base/command_line.h"
#include "ui/message_center/message_center_switches.h"
namespace message_center {
bool IsRichNotificationEnabled() {
return CommandLine::ForCurrentProcess()->HasSwitch(
switches::kEnableRichNotifications);
}
} // namespace message_center
<|file_sep|>current/ui/message_center/message_center_util.cc
// Copyright (c) 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "ui/message_center/message_center_util.h"
#include "base/command_line.h"
#include "ui/message_center/message_center_switches.h"
namespace message_center {
bool IsRichNotificationEnabled() {
#if defined(OS_WIN) && defined(USE_AURA)
return false;
#else
return CommandLine::ForCurrentProcess()->HasSwitch(
switches::kEnableRichNotifications);
}
} // namespace message_center
<|file_sep|>updated/ui/message_center/message_center_util.cc | // Copyright (c) 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "ui/message_center/message_center_util.h"
#include "base/command_line.h"
#include "ui/message_center/message_center_switches.h"
namespace message_center {
bool IsRichNotificationEnabled() {
#if defined(OS_WIN) && defined(USE_AURA)
return false;
#else
return CommandLine::ForCurrentProcess()->HasSwitch(
switches::kEnableRichNotifications);
#endif
}
} // namespace message_center | ui/message_center/message_center_util.cc | C++ | 4f7aa49682010bf86ce82cc8d88d411d8a28ff2f | <|file_sep|>ui/message_center/message_center_util.cc.diff
original:
updated:
#if defined(OS_WIN) && defined(USE_AURA)
return false;
#else
<|file_sep|>original/ui/message_center/message_center_util.cc
// Copyright (c) 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "ui/message_center/message_center_util.h"
#include "base/command_line.h"
#include "ui/message_center/message_center_switches.h"
namespace message_center {
bool IsRichNotificationEnabled() {
return CommandLine::ForCurrentProcess()->HasSwitch(
switches::kEnableRichNotifications);
}
} // namespace message_center
<|file_sep|>current/ui/message_center/message_center_util.cc
// Copyright (c) 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "ui/message_center/message_center_util.h"
#include "base/command_line.h"
#include "ui/message_center/message_center_switches.h"
namespace message_center {
bool IsRichNotificationEnabled() {
#if defined(OS_WIN) && defined(USE_AURA)
return false;
#else
return CommandLine::ForCurrentProcess()->HasSwitch(
switches::kEnableRichNotifications);
}
} // namespace message_center
<|file_sep|>updated/ui/message_center/message_center_util.cc
// Copyright (c) 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "ui/message_center/message_center_util.h"
#include "base/command_line.h"
#include "ui/message_center/message_center_switches.h"
namespace message_center {
bool IsRichNotificationEnabled() {
#if defined(OS_WIN) && defined(USE_AURA)
return false;
#else
return CommandLine::ForCurrentProcess()->HasSwitch(
switches::kEnableRichNotifications);
#endif
}
} // namespace message_center |
<|file_sep|>chrome/browser/ui/crypto_module_password_dialog_openssl.cc.diff
original:
updated:
gfx::NativeWindow parent,
<|file_sep|>original/chrome/browser/ui/crypto_module_password_dialog_openssl.cc
#include "base/logging.h"
namespace chrome {
void UnlockSlotsIfNecessary(const net::CryptoModuleList& modules,
CryptoModulePasswordReason reason,
const std::string& host,
const base::Closure& callback) {
// TODO(bulach): implement me.
NOTREACHED();
}
void UnlockCertSlotIfNecessary(net::X509Certificate* cert,
CryptoModulePasswordReason reason,
const std::string& host,
const base::Closure& callback) {
// TODO(bulach): implement me.
NOTREACHED();
}
} // namespace chrome
<|file_sep|>current/chrome/browser/ui/crypto_module_password_dialog_openssl.cc
namespace chrome {
void UnlockSlotsIfNecessary(const net::CryptoModuleList& modules,
CryptoModulePasswordReason reason,
const std::string& host,
gfx::NativeWindow parent,
const base::Closure& callback) {
// TODO(bulach): implement me.
NOTREACHED();
}
void UnlockCertSlotIfNecessary(net::X509Certificate* cert,
CryptoModulePasswordReason reason,
const std::string& host,
const base::Closure& callback) {
// TODO(bulach): implement me.
NOTREACHED();
}
} // namespace chrome
<|file_sep|>updated/chrome/browser/ui/crypto_module_password_dialog_openssl.cc | namespace chrome {
void UnlockSlotsIfNecessary(const net::CryptoModuleList& modules,
CryptoModulePasswordReason reason,
const std::string& host,
gfx::NativeWindow parent,
const base::Closure& callback) {
// TODO(bulach): implement me.
NOTREACHED();
}
void UnlockCertSlotIfNecessary(net::X509Certificate* cert,
CryptoModulePasswordReason reason,
const std::string& host,
gfx::NativeWindow parent,
const base::Closure& callback) {
// TODO(bulach): implement me.
NOTREACHED();
}
} // namespace chrome | chrome/browser/ui/crypto_module_password_dialog_openssl.cc | C++ | 08596f12bd48f1dd2d4958eed84cbb8c4d275e5d | <|file_sep|>chrome/browser/ui/crypto_module_password_dialog_openssl.cc.diff
original:
updated:
gfx::NativeWindow parent,
<|file_sep|>original/chrome/browser/ui/crypto_module_password_dialog_openssl.cc
#include "base/logging.h"
namespace chrome {
void UnlockSlotsIfNecessary(const net::CryptoModuleList& modules,
CryptoModulePasswordReason reason,
const std::string& host,
const base::Closure& callback) {
// TODO(bulach): implement me.
NOTREACHED();
}
void UnlockCertSlotIfNecessary(net::X509Certificate* cert,
CryptoModulePasswordReason reason,
const std::string& host,
const base::Closure& callback) {
// TODO(bulach): implement me.
NOTREACHED();
}
} // namespace chrome
<|file_sep|>current/chrome/browser/ui/crypto_module_password_dialog_openssl.cc
namespace chrome {
void UnlockSlotsIfNecessary(const net::CryptoModuleList& modules,
CryptoModulePasswordReason reason,
const std::string& host,
gfx::NativeWindow parent,
const base::Closure& callback) {
// TODO(bulach): implement me.
NOTREACHED();
}
void UnlockCertSlotIfNecessary(net::X509Certificate* cert,
CryptoModulePasswordReason reason,
const std::string& host,
const base::Closure& callback) {
// TODO(bulach): implement me.
NOTREACHED();
}
} // namespace chrome
<|file_sep|>updated/chrome/browser/ui/crypto_module_password_dialog_openssl.cc
namespace chrome {
void UnlockSlotsIfNecessary(const net::CryptoModuleList& modules,
CryptoModulePasswordReason reason,
const std::string& host,
gfx::NativeWindow parent,
const base::Closure& callback) {
// TODO(bulach): implement me.
NOTREACHED();
}
void UnlockCertSlotIfNecessary(net::X509Certificate* cert,
CryptoModulePasswordReason reason,
const std::string& host,
gfx::NativeWindow parent,
const base::Closure& callback) {
// TODO(bulach): implement me.
NOTREACHED();
}
} // namespace chrome |
<|file_sep|>mojo/common/user_agent.cc.diff
original:
updated:
#include "build/build_config.h"
<|file_sep|>mojo/common/user_agent.cc.diff
original:
updated:
#if defined(OS_ANDROID)
return "Mozilla/5.0 (Linux; Android 5.1.1; Nexus 7 Build/LMY48G) "
"AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.68 "
"Safari/537.36";
#else
<|file_sep|>original/mojo/common/user_agent.cc
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "mojo/common/user_agent.h"
namespace mojo {
namespace common {
std::string GetUserAgent() {
// TODO(jam): change depending on OS
return "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like "
"Gecko) Chrome/42.0.2311.68 Safari/537.36";
}
} // namespace common
} // namespace mojo
<|file_sep|>current/mojo/common/user_agent.cc
#include "mojo/common/user_agent.h"
#include "build/build_config.h"
namespace mojo {
namespace common {
std::string GetUserAgent() {
// TODO(jam): change depending on OS
#if defined(OS_ANDROID)
return "Mozilla/5.0 (Linux; Android 5.1.1; Nexus 7 Build/LMY48G) "
"AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.68 "
"Safari/537.36";
#else
return "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like "
"Gecko) Chrome/42.0.2311.68 Safari/537.36";
}
} // namespace common
} // namespace mojo
<|file_sep|>updated/mojo/common/user_agent.cc | #include "mojo/common/user_agent.h"
#include "build/build_config.h"
namespace mojo {
namespace common {
std::string GetUserAgent() {
// TODO(jam): change depending on OS
#if defined(OS_ANDROID)
return "Mozilla/5.0 (Linux; Android 5.1.1; Nexus 7 Build/LMY48G) "
"AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.68 "
"Safari/537.36";
#else
return "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like "
"Gecko) Chrome/42.0.2311.68 Safari/537.36";
#endif
}
} // namespace common
} // namespace mojo | mojo/common/user_agent.cc | C++ | e9f3b858148ac4b1bde0e06698861cae7c6cd7eb | <|file_sep|>mojo/common/user_agent.cc.diff
original:
updated:
#include "build/build_config.h"
<|file_sep|>mojo/common/user_agent.cc.diff
original:
updated:
#if defined(OS_ANDROID)
return "Mozilla/5.0 (Linux; Android 5.1.1; Nexus 7 Build/LMY48G) "
"AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.68 "
"Safari/537.36";
#else
<|file_sep|>original/mojo/common/user_agent.cc
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "mojo/common/user_agent.h"
namespace mojo {
namespace common {
std::string GetUserAgent() {
// TODO(jam): change depending on OS
return "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like "
"Gecko) Chrome/42.0.2311.68 Safari/537.36";
}
} // namespace common
} // namespace mojo
<|file_sep|>current/mojo/common/user_agent.cc
#include "mojo/common/user_agent.h"
#include "build/build_config.h"
namespace mojo {
namespace common {
std::string GetUserAgent() {
// TODO(jam): change depending on OS
#if defined(OS_ANDROID)
return "Mozilla/5.0 (Linux; Android 5.1.1; Nexus 7 Build/LMY48G) "
"AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.68 "
"Safari/537.36";
#else
return "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like "
"Gecko) Chrome/42.0.2311.68 Safari/537.36";
}
} // namespace common
} // namespace mojo
<|file_sep|>updated/mojo/common/user_agent.cc
#include "mojo/common/user_agent.h"
#include "build/build_config.h"
namespace mojo {
namespace common {
std::string GetUserAgent() {
// TODO(jam): change depending on OS
#if defined(OS_ANDROID)
return "Mozilla/5.0 (Linux; Android 5.1.1; Nexus 7 Build/LMY48G) "
"AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.68 "
"Safari/537.36";
#else
return "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like "
"Gecko) Chrome/42.0.2311.68 Safari/537.36";
#endif
}
} // namespace common
} // namespace mojo |
<|file_sep|>fuzz/oss_fuzz/FuzzAPISVGCanvas.cpp.diff
original:
updated:
#include "src/core/SkFontMgrPriv.h"
#include "tools/fonts/TestFontMgr.h"
<|file_sep|>original/fuzz/oss_fuzz/FuzzAPISVGCanvas.cpp
/*
* Copyright 2020 Google, LLC
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "fuzz/Fuzz.h"
void fuzz_SVGCanvas(Fuzz* f);
extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
auto fuzz = Fuzz(SkData::MakeWithoutCopy(data, size));
fuzz_SVGCanvas(&fuzz);
return 0;
}
<|file_sep|>current/fuzz/oss_fuzz/FuzzAPISVGCanvas.cpp
/*
* Copyright 2020 Google, LLC
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "fuzz/Fuzz.h"
#include "src/core/SkFontMgrPriv.h"
#include "tools/fonts/TestFontMgr.h"
void fuzz_SVGCanvas(Fuzz* f);
extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
auto fuzz = Fuzz(SkData::MakeWithoutCopy(data, size));
fuzz_SVGCanvas(&fuzz);
return 0;
}
<|file_sep|>updated/fuzz/oss_fuzz/FuzzAPISVGCanvas.cpp | /*
* Copyright 2020 Google, LLC
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "fuzz/Fuzz.h"
#include "src/core/SkFontMgrPriv.h"
#include "tools/fonts/TestFontMgr.h"
void fuzz_SVGCanvas(Fuzz* f);
extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
gSkFontMgr_DefaultFactory = &ToolUtils::MakePortableFontMgr;
auto fuzz = Fuzz(SkData::MakeWithoutCopy(data, size));
fuzz_SVGCanvas(&fuzz);
return 0;
} | fuzz/oss_fuzz/FuzzAPISVGCanvas.cpp | C++ | babba97ae63a2d8de425c7cc3926d5824f647b9c | <|file_sep|>fuzz/oss_fuzz/FuzzAPISVGCanvas.cpp.diff
original:
updated:
#include "src/core/SkFontMgrPriv.h"
#include "tools/fonts/TestFontMgr.h"
<|file_sep|>original/fuzz/oss_fuzz/FuzzAPISVGCanvas.cpp
/*
* Copyright 2020 Google, LLC
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "fuzz/Fuzz.h"
void fuzz_SVGCanvas(Fuzz* f);
extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
auto fuzz = Fuzz(SkData::MakeWithoutCopy(data, size));
fuzz_SVGCanvas(&fuzz);
return 0;
}
<|file_sep|>current/fuzz/oss_fuzz/FuzzAPISVGCanvas.cpp
/*
* Copyright 2020 Google, LLC
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "fuzz/Fuzz.h"
#include "src/core/SkFontMgrPriv.h"
#include "tools/fonts/TestFontMgr.h"
void fuzz_SVGCanvas(Fuzz* f);
extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
auto fuzz = Fuzz(SkData::MakeWithoutCopy(data, size));
fuzz_SVGCanvas(&fuzz);
return 0;
}
<|file_sep|>updated/fuzz/oss_fuzz/FuzzAPISVGCanvas.cpp
/*
* Copyright 2020 Google, LLC
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "fuzz/Fuzz.h"
#include "src/core/SkFontMgrPriv.h"
#include "tools/fonts/TestFontMgr.h"
void fuzz_SVGCanvas(Fuzz* f);
extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
gSkFontMgr_DefaultFactory = &ToolUtils::MakePortableFontMgr;
auto fuzz = Fuzz(SkData::MakeWithoutCopy(data, size));
fuzz_SVGCanvas(&fuzz);
return 0;
} |
<|file_sep|>content/app/mojo/mojo_init.cc.diff
original:
updated:
#include "mojo/edk/embedder/configuration.h"
<|file_sep|>original/content/app/mojo/mojo_init.cc
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "content/app/mojo/mojo_init.h"
#include "base/memory/scoped_ptr.h"
#include "mojo/edk/embedder/embedder.h"
#include "mojo/edk/embedder/simple_platform_support.h"
namespace content {
void InitializeMojo() {
mojo::embedder::Init(scoped_ptr<mojo::embedder::PlatformSupport>(
new mojo::embedder::SimplePlatformSupport()));
}
} // namespace content
<|file_sep|>current/content/app/mojo/mojo_init.cc
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "content/app/mojo/mojo_init.h"
#include "base/memory/scoped_ptr.h"
#include "mojo/edk/embedder/configuration.h"
#include "mojo/edk/embedder/embedder.h"
#include "mojo/edk/embedder/simple_platform_support.h"
namespace content {
void InitializeMojo() {
mojo::embedder::Init(scoped_ptr<mojo::embedder::PlatformSupport>(
new mojo::embedder::SimplePlatformSupport()));
}
} // namespace content
<|file_sep|>updated/content/app/mojo/mojo_init.cc |
#include "content/app/mojo/mojo_init.h"
#include "base/memory/scoped_ptr.h"
#include "mojo/edk/embedder/configuration.h"
#include "mojo/edk/embedder/embedder.h"
#include "mojo/edk/embedder/simple_platform_support.h"
namespace content {
void InitializeMojo() {
// Things like content_shell and DevTools ocassionally send big
// message which includes whole rendered screen or all loaded
// scripts. The buffer size has to be big enough to allow such use
// cases.
mojo::embedder::GetConfiguration()->max_message_num_bytes = 64*1024*1024;
mojo::embedder::Init(scoped_ptr<mojo::embedder::PlatformSupport>(
new mojo::embedder::SimplePlatformSupport()));
}
} // namespace content | content/app/mojo/mojo_init.cc | C++ | 872df152e57fe8ba6ebf668531147e482ca4f73f | <|file_sep|>content/app/mojo/mojo_init.cc.diff
original:
updated:
#include "mojo/edk/embedder/configuration.h"
<|file_sep|>original/content/app/mojo/mojo_init.cc
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "content/app/mojo/mojo_init.h"
#include "base/memory/scoped_ptr.h"
#include "mojo/edk/embedder/embedder.h"
#include "mojo/edk/embedder/simple_platform_support.h"
namespace content {
void InitializeMojo() {
mojo::embedder::Init(scoped_ptr<mojo::embedder::PlatformSupport>(
new mojo::embedder::SimplePlatformSupport()));
}
} // namespace content
<|file_sep|>current/content/app/mojo/mojo_init.cc
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "content/app/mojo/mojo_init.h"
#include "base/memory/scoped_ptr.h"
#include "mojo/edk/embedder/configuration.h"
#include "mojo/edk/embedder/embedder.h"
#include "mojo/edk/embedder/simple_platform_support.h"
namespace content {
void InitializeMojo() {
mojo::embedder::Init(scoped_ptr<mojo::embedder::PlatformSupport>(
new mojo::embedder::SimplePlatformSupport()));
}
} // namespace content
<|file_sep|>updated/content/app/mojo/mojo_init.cc
#include "content/app/mojo/mojo_init.h"
#include "base/memory/scoped_ptr.h"
#include "mojo/edk/embedder/configuration.h"
#include "mojo/edk/embedder/embedder.h"
#include "mojo/edk/embedder/simple_platform_support.h"
namespace content {
void InitializeMojo() {
// Things like content_shell and DevTools ocassionally send big
// message which includes whole rendered screen or all loaded
// scripts. The buffer size has to be big enough to allow such use
// cases.
mojo::embedder::GetConfiguration()->max_message_num_bytes = 64*1024*1024;
mojo::embedder::Init(scoped_ptr<mojo::embedder::PlatformSupport>(
new mojo::embedder::SimplePlatformSupport()));
}
} // namespace content |
<|file_sep|>athena/content/content_activity_factory.cc.diff
original:
updated:
#include "ui/aura/window.h"
<|file_sep|>athena/content/content_activity_factory.cc.diff
original:
updated:
activity->GetWindow()->SetName("WebActivity");
<|file_sep|>original/athena/content/content_activity_factory.cc
Activity* ContentActivityFactory::CreateWebActivity(
content::WebContents* contents) {
Activity* activity = new WebActivity(contents);
ActivityManager::Get()->AddActivity(activity);
return activity;
}
Activity* ContentActivityFactory::CreateAppActivity(
const std::string& app_id,
views::WebView* web_view) {
Activity* activity = new AppActivity(app_id, web_view);
ActivityManager::Get()->AddActivity(activity);
return activity;
}
ActivityFactory* CreateContentActivityFactory() {
return new ContentActivityFactory();
}
} // namespace athena
<|file_sep|>current/athena/content/content_activity_factory.cc
Activity* ContentActivityFactory::CreateWebActivity(
content::WebContents* contents) {
Activity* activity = new WebActivity(contents);
ActivityManager::Get()->AddActivity(activity);
return activity;
}
Activity* ContentActivityFactory::CreateAppActivity(
const std::string& app_id,
views::WebView* web_view) {
Activity* activity = new AppActivity(app_id, web_view);
ActivityManager::Get()->AddActivity(activity);
return activity;
}
ActivityFactory* CreateContentActivityFactory() {
return new ContentActivityFactory();
}
} // namespace athena
<|file_sep|>updated/athena/content/content_activity_factory.cc | Activity* ContentActivityFactory::CreateWebActivity(
content::WebContents* contents) {
Activity* activity = new WebActivity(contents);
ActivityManager::Get()->AddActivity(activity);
return activity;
}
Activity* ContentActivityFactory::CreateAppActivity(
const std::string& app_id,
views::WebView* web_view) {
Activity* activity = new AppActivity(app_id, web_view);
ActivityManager::Get()->AddActivity(activity);
activity->GetWindow()->SetName("AppActivity");
return activity;
}
ActivityFactory* CreateContentActivityFactory() {
return new ContentActivityFactory();
}
} // namespace athena | athena/content/content_activity_factory.cc | C++ | 9980f312b6216fb29a7ec981306ed47ce92aa98e | <|file_sep|>athena/content/content_activity_factory.cc.diff
original:
updated:
#include "ui/aura/window.h"
<|file_sep|>athena/content/content_activity_factory.cc.diff
original:
updated:
activity->GetWindow()->SetName("WebActivity");
<|file_sep|>original/athena/content/content_activity_factory.cc
Activity* ContentActivityFactory::CreateWebActivity(
content::WebContents* contents) {
Activity* activity = new WebActivity(contents);
ActivityManager::Get()->AddActivity(activity);
return activity;
}
Activity* ContentActivityFactory::CreateAppActivity(
const std::string& app_id,
views::WebView* web_view) {
Activity* activity = new AppActivity(app_id, web_view);
ActivityManager::Get()->AddActivity(activity);
return activity;
}
ActivityFactory* CreateContentActivityFactory() {
return new ContentActivityFactory();
}
} // namespace athena
<|file_sep|>current/athena/content/content_activity_factory.cc
Activity* ContentActivityFactory::CreateWebActivity(
content::WebContents* contents) {
Activity* activity = new WebActivity(contents);
ActivityManager::Get()->AddActivity(activity);
return activity;
}
Activity* ContentActivityFactory::CreateAppActivity(
const std::string& app_id,
views::WebView* web_view) {
Activity* activity = new AppActivity(app_id, web_view);
ActivityManager::Get()->AddActivity(activity);
return activity;
}
ActivityFactory* CreateContentActivityFactory() {
return new ContentActivityFactory();
}
} // namespace athena
<|file_sep|>updated/athena/content/content_activity_factory.cc
Activity* ContentActivityFactory::CreateWebActivity(
content::WebContents* contents) {
Activity* activity = new WebActivity(contents);
ActivityManager::Get()->AddActivity(activity);
return activity;
}
Activity* ContentActivityFactory::CreateAppActivity(
const std::string& app_id,
views::WebView* web_view) {
Activity* activity = new AppActivity(app_id, web_view);
ActivityManager::Get()->AddActivity(activity);
activity->GetWindow()->SetName("AppActivity");
return activity;
}
ActivityFactory* CreateContentActivityFactory() {
return new ContentActivityFactory();
}
} // namespace athena |
<|file_sep|>tools/evm2wasm/main.cpp.diff
original:
updated:
#include <algorithm>
<|file_sep|>original/tools/evm2wasm/main.cpp
}
ifstream input(argv[1]);
if (!input.is_open()) {
cerr << "File not found: " << argv[1] << endl;
return 1;
}
string str(
(std::istreambuf_iterator<char>(input)),
std::istreambuf_iterator<char>()
);
if (wast) {
cout << evm2wasm::evmhex2wast(str) << endl;
} else {
cout << evm2wasm::evmhex2wasm(str) << endl;
}
return 0;
}
<|file_sep|>current/tools/evm2wasm/main.cpp
}
ifstream input(argv[1]);
if (!input.is_open()) {
cerr << "File not found: " << argv[1] << endl;
return 1;
}
string str(
(std::istreambuf_iterator<char>(input)),
std::istreambuf_iterator<char>()
);
if (wast) {
cout << evm2wasm::evmhex2wast(str) << endl;
} else {
cout << evm2wasm::evmhex2wasm(str) << endl;
}
return 0;
}
<|file_sep|>updated/tools/evm2wasm/main.cpp | if (!input.is_open()) {
cerr << "File not found: " << argv[1] << endl;
return 1;
}
string str(
(std::istreambuf_iterator<char>(input)),
std::istreambuf_iterator<char>()
);
// clean input of any whitespace (including space and new lines)
str.erase(remove_if(str.begin(), str.end(), [](unsigned char x){return std::isspace(x);}), str.end());
if (wast) {
cout << evm2wasm::evmhex2wast(str) << endl;
} else {
cout << evm2wasm::evmhex2wasm(str) << endl;
}
return 0;
} | tools/evm2wasm/main.cpp | C++ | fd10725688a0580fec6f74b8f48b3ea13d16e5ba | <|file_sep|>tools/evm2wasm/main.cpp.diff
original:
updated:
#include <algorithm>
<|file_sep|>original/tools/evm2wasm/main.cpp
}
ifstream input(argv[1]);
if (!input.is_open()) {
cerr << "File not found: " << argv[1] << endl;
return 1;
}
string str(
(std::istreambuf_iterator<char>(input)),
std::istreambuf_iterator<char>()
);
if (wast) {
cout << evm2wasm::evmhex2wast(str) << endl;
} else {
cout << evm2wasm::evmhex2wasm(str) << endl;
}
return 0;
}
<|file_sep|>current/tools/evm2wasm/main.cpp
}
ifstream input(argv[1]);
if (!input.is_open()) {
cerr << "File not found: " << argv[1] << endl;
return 1;
}
string str(
(std::istreambuf_iterator<char>(input)),
std::istreambuf_iterator<char>()
);
if (wast) {
cout << evm2wasm::evmhex2wast(str) << endl;
} else {
cout << evm2wasm::evmhex2wasm(str) << endl;
}
return 0;
}
<|file_sep|>updated/tools/evm2wasm/main.cpp
if (!input.is_open()) {
cerr << "File not found: " << argv[1] << endl;
return 1;
}
string str(
(std::istreambuf_iterator<char>(input)),
std::istreambuf_iterator<char>()
);
// clean input of any whitespace (including space and new lines)
str.erase(remove_if(str.begin(), str.end(), [](unsigned char x){return std::isspace(x);}), str.end());
if (wast) {
cout << evm2wasm::evmhex2wast(str) << endl;
} else {
cout << evm2wasm::evmhex2wasm(str) << endl;
}
return 0;
} |
<|file_sep|>src/Dummy.cpp.diff
original:
updated:
#include <boost/asio.hpp>
<|file_sep|>original/src/Dummy.cpp
#include <iostream>
int main () {
std::cout << "Hello word!" << std::endl;
}
<|file_sep|>current/src/Dummy.cpp
#include <iostream>
#include <boost/asio.hpp>
int main () {
std::cout << "Hello word!" << std::endl;
}
<|file_sep|>updated/src/Dummy.cpp | #include <iostream>
#include <boost/asio.hpp>
int main () {
boost::asio::io_service io_dummy;
boost::asio::deadline_timer t(io_dummy, boost::posix_time::seconds(5));
t.wait();
std::cout << "Hello word!" << std::endl;
} | src/Dummy.cpp | C++ | 5829f2561be162e8f44a7ba2b9962c80372e153c | <|file_sep|>src/Dummy.cpp.diff
original:
updated:
#include <boost/asio.hpp>
<|file_sep|>original/src/Dummy.cpp
#include <iostream>
int main () {
std::cout << "Hello word!" << std::endl;
}
<|file_sep|>current/src/Dummy.cpp
#include <iostream>
#include <boost/asio.hpp>
int main () {
std::cout << "Hello word!" << std::endl;
}
<|file_sep|>updated/src/Dummy.cpp
#include <iostream>
#include <boost/asio.hpp>
int main () {
boost::asio::io_service io_dummy;
boost::asio::deadline_timer t(io_dummy, boost::posix_time::seconds(5));
t.wait();
std::cout << "Hello word!" << std::endl;
} |
<|file_sep|>src/manipulator/pattern_posture_generator/src/pattern_posture_generator_node.cpp.diff
original:
updated:
ROS_INFO("Ready. getPostureKey");
<|file_sep|>src/manipulator/pattern_posture_generator/src/pattern_posture_generator_node.cpp.diff
original:
updated:
ROS_INFO("Get map of patterns parent");
<|file_sep|>original/src/manipulator/pattern_posture_generator/src/pattern_posture_generator_node.cpp
}
PatternPostureGenerator::PatternPostureGenerator(){}
PatternPostureGenerator::PatternPostureGenerator(ros::NodeHandle& nh) {
if (!nh.getParam("pattern", pattern_names)) return;
for (std::map<std::string, std::string >::iterator it = pattern_names.begin();
it != pattern_names.end();
it++) {
std::vector<double> posture;
if (!nh.getParam(std::string("pattern/").append(it->second), posture)) return;
std::copy(posture.begin(), posture.end(), std::back_inserter(posture_datas[it->second]));
}
key_srv = nh.advertiseService("getPostureKey", &PatternPostureGenerator::getPostureKey, this);
}
bool PatternPostureGenerator::getPostureKey(pattern_posture_generator::PatternKeyPosture::Request& req,
pattern_posture_generator::PatternKeyPosture::Response& res) {
std::copy(posture_datas[req.name].begin(), posture_datas[req.name].end(), std::back_inserter(res.posture));
return true;
}
<|file_sep|>current/src/manipulator/pattern_posture_generator/src/pattern_posture_generator_node.cpp
PatternPostureGenerator::PatternPostureGenerator(){}
PatternPostureGenerator::PatternPostureGenerator(ros::NodeHandle& nh) {
if (!nh.getParam("pattern", pattern_names)) return;
ROS_INFO("Get map of patterns parent");
for (std::map<std::string, std::string >::iterator it = pattern_names.begin();
it != pattern_names.end();
it++) {
std::vector<double> posture;
if (!nh.getParam(std::string("pattern/").append(it->second), posture)) return;
std::copy(posture.begin(), posture.end(), std::back_inserter(posture_datas[it->second]));
}
key_srv = nh.advertiseService("getPostureKey", &PatternPostureGenerator::getPostureKey, this);
}
bool PatternPostureGenerator::getPostureKey(pattern_posture_generator::PatternKeyPosture::Request& req,
pattern_posture_generator::PatternKeyPosture::Response& res) {
std::copy(posture_datas[req.name].begin(), posture_datas[req.name].end(), std::back_inserter(res.posture));
return true;
}
<|file_sep|>updated/src/manipulator/pattern_posture_generator/src/pattern_posture_generator_node.cpp | PatternPostureGenerator::PatternPostureGenerator(){}
PatternPostureGenerator::PatternPostureGenerator(ros::NodeHandle& nh) {
if (!nh.getParam("pattern", pattern_names)) return;
ROS_INFO("Get map of patterns parent");
for (std::map<std::string, std::string >::iterator it = pattern_names.begin();
it != pattern_names.end();
it++) {
std::vector<double> posture;
if (!nh.getParam(std::string("pattern/").append(it->second), posture)) return;
std::copy(posture.begin(), posture.end(), std::back_inserter(posture_datas[it->second]));
ROS_INFO(std::string("Found posture of ").append(it->second).c_str());
}
key_srv = nh.advertiseService("getPostureKey", &PatternPostureGenerator::getPostureKey, this);
}
bool PatternPostureGenerator::getPostureKey(pattern_posture_generator::PatternKeyPosture::Request& req,
pattern_posture_generator::PatternKeyPosture::Response& res) {
std::copy(posture_datas[req.name].begin(), posture_datas[req.name].end(), std::back_inserter(res.posture));
return true;
} | src/manipulator/pattern_posture_generator/src/pattern_posture_generator_node.cpp | C++ | 8020136efeaceb6e6d54fe6036446874c596e218 | <|file_sep|>src/manipulator/pattern_posture_generator/src/pattern_posture_generator_node.cpp.diff
original:
updated:
ROS_INFO("Ready. getPostureKey");
<|file_sep|>src/manipulator/pattern_posture_generator/src/pattern_posture_generator_node.cpp.diff
original:
updated:
ROS_INFO("Get map of patterns parent");
<|file_sep|>original/src/manipulator/pattern_posture_generator/src/pattern_posture_generator_node.cpp
}
PatternPostureGenerator::PatternPostureGenerator(){}
PatternPostureGenerator::PatternPostureGenerator(ros::NodeHandle& nh) {
if (!nh.getParam("pattern", pattern_names)) return;
for (std::map<std::string, std::string >::iterator it = pattern_names.begin();
it != pattern_names.end();
it++) {
std::vector<double> posture;
if (!nh.getParam(std::string("pattern/").append(it->second), posture)) return;
std::copy(posture.begin(), posture.end(), std::back_inserter(posture_datas[it->second]));
}
key_srv = nh.advertiseService("getPostureKey", &PatternPostureGenerator::getPostureKey, this);
}
bool PatternPostureGenerator::getPostureKey(pattern_posture_generator::PatternKeyPosture::Request& req,
pattern_posture_generator::PatternKeyPosture::Response& res) {
std::copy(posture_datas[req.name].begin(), posture_datas[req.name].end(), std::back_inserter(res.posture));
return true;
}
<|file_sep|>current/src/manipulator/pattern_posture_generator/src/pattern_posture_generator_node.cpp
PatternPostureGenerator::PatternPostureGenerator(){}
PatternPostureGenerator::PatternPostureGenerator(ros::NodeHandle& nh) {
if (!nh.getParam("pattern", pattern_names)) return;
ROS_INFO("Get map of patterns parent");
for (std::map<std::string, std::string >::iterator it = pattern_names.begin();
it != pattern_names.end();
it++) {
std::vector<double> posture;
if (!nh.getParam(std::string("pattern/").append(it->second), posture)) return;
std::copy(posture.begin(), posture.end(), std::back_inserter(posture_datas[it->second]));
}
key_srv = nh.advertiseService("getPostureKey", &PatternPostureGenerator::getPostureKey, this);
}
bool PatternPostureGenerator::getPostureKey(pattern_posture_generator::PatternKeyPosture::Request& req,
pattern_posture_generator::PatternKeyPosture::Response& res) {
std::copy(posture_datas[req.name].begin(), posture_datas[req.name].end(), std::back_inserter(res.posture));
return true;
}
<|file_sep|>updated/src/manipulator/pattern_posture_generator/src/pattern_posture_generator_node.cpp
PatternPostureGenerator::PatternPostureGenerator(){}
PatternPostureGenerator::PatternPostureGenerator(ros::NodeHandle& nh) {
if (!nh.getParam("pattern", pattern_names)) return;
ROS_INFO("Get map of patterns parent");
for (std::map<std::string, std::string >::iterator it = pattern_names.begin();
it != pattern_names.end();
it++) {
std::vector<double> posture;
if (!nh.getParam(std::string("pattern/").append(it->second), posture)) return;
std::copy(posture.begin(), posture.end(), std::back_inserter(posture_datas[it->second]));
ROS_INFO(std::string("Found posture of ").append(it->second).c_str());
}
key_srv = nh.advertiseService("getPostureKey", &PatternPostureGenerator::getPostureKey, this);
}
bool PatternPostureGenerator::getPostureKey(pattern_posture_generator::PatternKeyPosture::Request& req,
pattern_posture_generator::PatternKeyPosture::Response& res) {
std::copy(posture_datas[req.name].begin(), posture_datas[req.name].end(), std::back_inserter(res.posture));
return true;
} |
<|file_sep|>src/main.cpp.diff
original:
updated:
a.setApplicationName("Humbug Desktop");
a.setApplicationVersion("0.1");
<|file_sep|>original/src/main.cpp
#include "HumbugWindow.h"
#include <QApplication>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
HumbugWindow w;
if (argc == 3 && QString(argv[1]) == QString("--site")) {
w.setUrl(QUrl(argv[2]));
}
w.show();
return a.exec();
}
<|file_sep|>current/src/main.cpp
#include "HumbugWindow.h"
#include <QApplication>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
a.setApplicationName("Humbug Desktop");
a.setApplicationVersion("0.1");
HumbugWindow w;
if (argc == 3 && QString(argv[1]) == QString("--site")) {
w.setUrl(QUrl(argv[2]));
}
w.show();
return a.exec();
}
<|file_sep|>updated/src/main.cpp | #include "HumbugWindow.h"
#include <QApplication>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
a.setApplicationName("Humbug Desktop");
a.setApplicationVersion("0.1");
HumbugWindow w;
if (argc == 3 && QString(argv[1]) == QString("--site")) {
w.setUrl(QUrl(argv[2]));
}
w.show();
return a.exec();
} | src/main.cpp | C++ | 71e2dd4cd4bf56c926ae431b84e77f5c7d6a18a2 | <|file_sep|>src/main.cpp.diff
original:
updated:
a.setApplicationName("Humbug Desktop");
a.setApplicationVersion("0.1");
<|file_sep|>original/src/main.cpp
#include "HumbugWindow.h"
#include <QApplication>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
HumbugWindow w;
if (argc == 3 && QString(argv[1]) == QString("--site")) {
w.setUrl(QUrl(argv[2]));
}
w.show();
return a.exec();
}
<|file_sep|>current/src/main.cpp
#include "HumbugWindow.h"
#include <QApplication>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
a.setApplicationName("Humbug Desktop");
a.setApplicationVersion("0.1");
HumbugWindow w;
if (argc == 3 && QString(argv[1]) == QString("--site")) {
w.setUrl(QUrl(argv[2]));
}
w.show();
return a.exec();
}
<|file_sep|>updated/src/main.cpp
#include "HumbugWindow.h"
#include <QApplication>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
a.setApplicationName("Humbug Desktop");
a.setApplicationVersion("0.1");
HumbugWindow w;
if (argc == 3 && QString(argv[1]) == QString("--site")) {
w.setUrl(QUrl(argv[2]));
}
w.show();
return a.exec();
} |
<|file_sep|>src/common/species_dialog.cc.diff
original:
updated:
accept();
<|file_sep|>src/common/species_dialog.cc.diff
original:
updated:
reject();
<|file_sep|>src/common/species_dialog.cc.diff
original:
updated:
QListWidgetItem *current = ui_->subspeciesList->currentItem();
if(current != nullptr) {
delete current;
}
<|file_sep|>original/src/common/species_dialog.cc
void SpeciesDialog::on_ok_clicked() {
}
void SpeciesDialog::on_cancel_clicked() {
}
void SpeciesDialog::on_removeSubspecies_clicked() {
}
void SpeciesDialog::on_addSubspecies_clicked() {
}
Species SpeciesDialog::getSpecies() {
Species species;
return species;
}
#include "../../include/fish_detector/common/moc_species_dialog.cpp"
} // namespace fish_detector
<|file_sep|>current/src/common/species_dialog.cc
reject();
}
void SpeciesDialog::on_removeSubspecies_clicked() {
QListWidgetItem *current = ui_->subspeciesList->currentItem();
if(current != nullptr) {
delete current;
}
}
void SpeciesDialog::on_addSubspecies_clicked() {
}
Species SpeciesDialog::getSpecies() {
Species species;
return species;
}
#include "../../include/fish_detector/common/moc_species_dialog.cpp"
} // namespace fish_detector
<|file_sep|>updated/src/common/species_dialog.cc |
void SpeciesDialog::on_removeSubspecies_clicked() {
QListWidgetItem *current = ui_->subspeciesList->currentItem();
if(current != nullptr) {
delete current;
}
}
void SpeciesDialog::on_addSubspecies_clicked() {
QListWidgetItem *item = new QListWidgetItem("New subspecies");
item->setFlags(item->flags() | Qt::ItemIsEditable);
ui_->subspeciesList->addItem(item);
ui_->subspeciesList->editItem(item);
}
Species SpeciesDialog::getSpecies() {
Species species;
return species;
}
#include "../../include/fish_detector/common/moc_species_dialog.cpp" | src/common/species_dialog.cc | C++ | 84edc6edeca2d5534c12a87df90cd684dfe9918d | <|file_sep|>src/common/species_dialog.cc.diff
original:
updated:
accept();
<|file_sep|>src/common/species_dialog.cc.diff
original:
updated:
reject();
<|file_sep|>src/common/species_dialog.cc.diff
original:
updated:
QListWidgetItem *current = ui_->subspeciesList->currentItem();
if(current != nullptr) {
delete current;
}
<|file_sep|>original/src/common/species_dialog.cc
void SpeciesDialog::on_ok_clicked() {
}
void SpeciesDialog::on_cancel_clicked() {
}
void SpeciesDialog::on_removeSubspecies_clicked() {
}
void SpeciesDialog::on_addSubspecies_clicked() {
}
Species SpeciesDialog::getSpecies() {
Species species;
return species;
}
#include "../../include/fish_detector/common/moc_species_dialog.cpp"
} // namespace fish_detector
<|file_sep|>current/src/common/species_dialog.cc
reject();
}
void SpeciesDialog::on_removeSubspecies_clicked() {
QListWidgetItem *current = ui_->subspeciesList->currentItem();
if(current != nullptr) {
delete current;
}
}
void SpeciesDialog::on_addSubspecies_clicked() {
}
Species SpeciesDialog::getSpecies() {
Species species;
return species;
}
#include "../../include/fish_detector/common/moc_species_dialog.cpp"
} // namespace fish_detector
<|file_sep|>updated/src/common/species_dialog.cc
void SpeciesDialog::on_removeSubspecies_clicked() {
QListWidgetItem *current = ui_->subspeciesList->currentItem();
if(current != nullptr) {
delete current;
}
}
void SpeciesDialog::on_addSubspecies_clicked() {
QListWidgetItem *item = new QListWidgetItem("New subspecies");
item->setFlags(item->flags() | Qt::ItemIsEditable);
ui_->subspeciesList->addItem(item);
ui_->subspeciesList->editItem(item);
}
Species SpeciesDialog::getSpecies() {
Species species;
return species;
}
#include "../../include/fish_detector/common/moc_species_dialog.cpp" |
<|file_sep|>source/tools/cgwhite/main.cpp.diff
original:
updated:
#include <widgetzeug/dark_fusion_style.hpp>
<|file_sep|>original/source/tools/cgwhite/main.cpp
#if defined(WIN32) && !defined(_DEBUG)
#pragma comment(linker, "/SUBSYSTEM:WINDOWS /entry:mainCRTStartup")
#endif
#include "Application.h"
#include <memory>
#include <gloperate-qtapplication/Viewer.h>
int main(int argc, char * argv[])
{
Application app(argc, argv);
std::unique_ptr<gloperate_qtapplication::Viewer> viewer(new gloperate_qtapplication::Viewer()); // make_unique is C++14
viewer->show();
return app.exec();
}
<|file_sep|>current/source/tools/cgwhite/main.cpp
#endif
#include "Application.h"
#include <memory>
#include <gloperate-qtapplication/Viewer.h>
#include <widgetzeug/dark_fusion_style.hpp>
int main(int argc, char * argv[])
{
Application app(argc, argv);
std::unique_ptr<gloperate_qtapplication::Viewer> viewer(new gloperate_qtapplication::Viewer()); // make_unique is C++14
viewer->show();
return app.exec();
}
<|file_sep|>updated/source/tools/cgwhite/main.cpp |
#include "Application.h"
#include <memory>
#include <gloperate-qtapplication/Viewer.h>
#include <widgetzeug/dark_fusion_style.hpp>
int main(int argc, char * argv[])
{
Application app(argc, argv);
widgetzeug::enableDarkFusionStyle();
std::unique_ptr<gloperate_qtapplication::Viewer> viewer(new gloperate_qtapplication::Viewer()); // make_unique is C++14
viewer->show();
return app.exec();
} | source/tools/cgwhite/main.cpp | C++ | 4945f164e58cbc6952225289add67b9632669ddb | <|file_sep|>source/tools/cgwhite/main.cpp.diff
original:
updated:
#include <widgetzeug/dark_fusion_style.hpp>
<|file_sep|>original/source/tools/cgwhite/main.cpp
#if defined(WIN32) && !defined(_DEBUG)
#pragma comment(linker, "/SUBSYSTEM:WINDOWS /entry:mainCRTStartup")
#endif
#include "Application.h"
#include <memory>
#include <gloperate-qtapplication/Viewer.h>
int main(int argc, char * argv[])
{
Application app(argc, argv);
std::unique_ptr<gloperate_qtapplication::Viewer> viewer(new gloperate_qtapplication::Viewer()); // make_unique is C++14
viewer->show();
return app.exec();
}
<|file_sep|>current/source/tools/cgwhite/main.cpp
#endif
#include "Application.h"
#include <memory>
#include <gloperate-qtapplication/Viewer.h>
#include <widgetzeug/dark_fusion_style.hpp>
int main(int argc, char * argv[])
{
Application app(argc, argv);
std::unique_ptr<gloperate_qtapplication::Viewer> viewer(new gloperate_qtapplication::Viewer()); // make_unique is C++14
viewer->show();
return app.exec();
}
<|file_sep|>updated/source/tools/cgwhite/main.cpp
#include "Application.h"
#include <memory>
#include <gloperate-qtapplication/Viewer.h>
#include <widgetzeug/dark_fusion_style.hpp>
int main(int argc, char * argv[])
{
Application app(argc, argv);
widgetzeug::enableDarkFusionStyle();
std::unique_ptr<gloperate_qtapplication::Viewer> viewer(new gloperate_qtapplication::Viewer()); // make_unique is C++14
viewer->show();
return app.exec();
} |
<|file_sep|>2DXngine.Test/src/Integration_Tiled/ParseMapTest.cc.diff
original:
updated:
TEST_F(TiledFixture, map_should_have_TestObject_parsed)
{
auto group = _parsedMap->getObjectGroup("TestObject");
<|file_sep|>original/2DXngine.Test/src/Integration_Tiled/ParseMapTest.cc
#include "gtest\gtest.h"
#include "TiledFixture.h"
TEST_F(TiledFixture, map_attributes_should_be_parsed)
{
ASSERT_EQ("1.0", _parsedMap->get_version());
ASSERT_EQ("1.0.3", _parsedMap->get_tiledVersion());
ASSERT_EQ(Orientation::ORTOGNAL, _parsedMap->get_orientation());
ASSERT_EQ(RenderOrder::RIGHT_DOWN, _parsedMap->get_renderOrder());
ASSERT_EQ(10, _parsedMap->get_width());
ASSERT_EQ(10, _parsedMap->get_height());
ASSERT_EQ(32, _parsedMap->get_tileWidth());
ASSERT_EQ(32, _parsedMap->get_tileHeight());
}
<|file_sep|>current/2DXngine.Test/src/Integration_Tiled/ParseMapTest.cc
#include "gtest\gtest.h"
#include "TiledFixture.h"
TEST_F(TiledFixture, map_attributes_should_be_parsed)
{
ASSERT_EQ("1.0", _parsedMap->get_version());
ASSERT_EQ("1.0.3", _parsedMap->get_tiledVersion());
ASSERT_EQ(Orientation::ORTOGNAL, _parsedMap->get_orientation());
ASSERT_EQ(RenderOrder::RIGHT_DOWN, _parsedMap->get_renderOrder());
ASSERT_EQ(10, _parsedMap->get_width());
ASSERT_EQ(10, _parsedMap->get_height());
ASSERT_EQ(32, _parsedMap->get_tileWidth());
ASSERT_EQ(32, _parsedMap->get_tileHeight());
}
TEST_F(TiledFixture, map_should_have_TestObject_parsed)
{
auto group = _parsedMap->getObjectGroup("TestObject");
<|file_sep|>updated/2DXngine.Test/src/Integration_Tiled/ParseMapTest.cc |
TEST_F(TiledFixture, map_attributes_should_be_parsed)
{
ASSERT_EQ("1.0", _parsedMap->get_version());
ASSERT_EQ("1.0.3", _parsedMap->get_tiledVersion());
ASSERT_EQ(Orientation::ORTOGNAL, _parsedMap->get_orientation());
ASSERT_EQ(RenderOrder::RIGHT_DOWN, _parsedMap->get_renderOrder());
ASSERT_EQ(10, _parsedMap->get_width());
ASSERT_EQ(10, _parsedMap->get_height());
ASSERT_EQ(32, _parsedMap->get_tileWidth());
ASSERT_EQ(32, _parsedMap->get_tileHeight());
}
TEST_F(TiledFixture, map_should_have_TestObject_parsed)
{
auto group = _parsedMap->getObjectGroup("TestObject");
ASSERT_EQ(group.get_name(), "TestObject");
}
| 2DXngine.Test/src/Integration_Tiled/ParseMapTest.cc | C++ | f7550e46ef84d35f05abb94c993d52b75af0a51c | <|file_sep|>2DXngine.Test/src/Integration_Tiled/ParseMapTest.cc.diff
original:
updated:
TEST_F(TiledFixture, map_should_have_TestObject_parsed)
{
auto group = _parsedMap->getObjectGroup("TestObject");
<|file_sep|>original/2DXngine.Test/src/Integration_Tiled/ParseMapTest.cc
#include "gtest\gtest.h"
#include "TiledFixture.h"
TEST_F(TiledFixture, map_attributes_should_be_parsed)
{
ASSERT_EQ("1.0", _parsedMap->get_version());
ASSERT_EQ("1.0.3", _parsedMap->get_tiledVersion());
ASSERT_EQ(Orientation::ORTOGNAL, _parsedMap->get_orientation());
ASSERT_EQ(RenderOrder::RIGHT_DOWN, _parsedMap->get_renderOrder());
ASSERT_EQ(10, _parsedMap->get_width());
ASSERT_EQ(10, _parsedMap->get_height());
ASSERT_EQ(32, _parsedMap->get_tileWidth());
ASSERT_EQ(32, _parsedMap->get_tileHeight());
}
<|file_sep|>current/2DXngine.Test/src/Integration_Tiled/ParseMapTest.cc
#include "gtest\gtest.h"
#include "TiledFixture.h"
TEST_F(TiledFixture, map_attributes_should_be_parsed)
{
ASSERT_EQ("1.0", _parsedMap->get_version());
ASSERT_EQ("1.0.3", _parsedMap->get_tiledVersion());
ASSERT_EQ(Orientation::ORTOGNAL, _parsedMap->get_orientation());
ASSERT_EQ(RenderOrder::RIGHT_DOWN, _parsedMap->get_renderOrder());
ASSERT_EQ(10, _parsedMap->get_width());
ASSERT_EQ(10, _parsedMap->get_height());
ASSERT_EQ(32, _parsedMap->get_tileWidth());
ASSERT_EQ(32, _parsedMap->get_tileHeight());
}
TEST_F(TiledFixture, map_should_have_TestObject_parsed)
{
auto group = _parsedMap->getObjectGroup("TestObject");
<|file_sep|>updated/2DXngine.Test/src/Integration_Tiled/ParseMapTest.cc
TEST_F(TiledFixture, map_attributes_should_be_parsed)
{
ASSERT_EQ("1.0", _parsedMap->get_version());
ASSERT_EQ("1.0.3", _parsedMap->get_tiledVersion());
ASSERT_EQ(Orientation::ORTOGNAL, _parsedMap->get_orientation());
ASSERT_EQ(RenderOrder::RIGHT_DOWN, _parsedMap->get_renderOrder());
ASSERT_EQ(10, _parsedMap->get_width());
ASSERT_EQ(10, _parsedMap->get_height());
ASSERT_EQ(32, _parsedMap->get_tileWidth());
ASSERT_EQ(32, _parsedMap->get_tileHeight());
}
TEST_F(TiledFixture, map_should_have_TestObject_parsed)
{
auto group = _parsedMap->getObjectGroup("TestObject");
ASSERT_EQ(group.get_name(), "TestObject");
}
|
<|file_sep|>QGVCore/private/QGVGraphPrivate.cpp.diff
original:
updated:
: _graph (NULL)
<|file_sep|>original/QGVCore/private/QGVGraphPrivate.cpp
#include "QGVGraphPrivate.h"
QGVGraphPrivate::QGVGraphPrivate(Agraph_t *graph)
{
setGraph(graph);
}
void QGVGraphPrivate::setGraph(Agraph_t *graph)
{
_graph = graph;
}
Agraph_t* QGVGraphPrivate::graph() const
{
return _graph;
}
<|file_sep|>current/QGVCore/private/QGVGraphPrivate.cpp
#include "QGVGraphPrivate.h"
QGVGraphPrivate::QGVGraphPrivate(Agraph_t *graph)
: _graph (NULL)
{
setGraph(graph);
}
void QGVGraphPrivate::setGraph(Agraph_t *graph)
{
_graph = graph;
}
Agraph_t* QGVGraphPrivate::graph() const
{
return _graph;
}
<|file_sep|>updated/QGVCore/private/QGVGraphPrivate.cpp | #include "QGVGraphPrivate.h"
QGVGraphPrivate::QGVGraphPrivate(Agraph_t *graph)
: _graph (NULL)
{
setGraph(graph);
}
void QGVGraphPrivate::setGraph(Agraph_t *graph)
{
if (_graph != NULL)
agclose(_graph);
_graph = graph;
}
Agraph_t* QGVGraphPrivate::graph() const
{
return _graph;
} | QGVCore/private/QGVGraphPrivate.cpp | C++ | bb33a8368a002e643dbcb9d8a43ce3bec31baa1e | <|file_sep|>QGVCore/private/QGVGraphPrivate.cpp.diff
original:
updated:
: _graph (NULL)
<|file_sep|>original/QGVCore/private/QGVGraphPrivate.cpp
#include "QGVGraphPrivate.h"
QGVGraphPrivate::QGVGraphPrivate(Agraph_t *graph)
{
setGraph(graph);
}
void QGVGraphPrivate::setGraph(Agraph_t *graph)
{
_graph = graph;
}
Agraph_t* QGVGraphPrivate::graph() const
{
return _graph;
}
<|file_sep|>current/QGVCore/private/QGVGraphPrivate.cpp
#include "QGVGraphPrivate.h"
QGVGraphPrivate::QGVGraphPrivate(Agraph_t *graph)
: _graph (NULL)
{
setGraph(graph);
}
void QGVGraphPrivate::setGraph(Agraph_t *graph)
{
_graph = graph;
}
Agraph_t* QGVGraphPrivate::graph() const
{
return _graph;
}
<|file_sep|>updated/QGVCore/private/QGVGraphPrivate.cpp
#include "QGVGraphPrivate.h"
QGVGraphPrivate::QGVGraphPrivate(Agraph_t *graph)
: _graph (NULL)
{
setGraph(graph);
}
void QGVGraphPrivate::setGraph(Agraph_t *graph)
{
if (_graph != NULL)
agclose(_graph);
_graph = graph;
}
Agraph_t* QGVGraphPrivate::graph() const
{
return _graph;
} |
<|file_sep|>es-general/Registration.cpp.diff
original:
updated:
#include "comp/StaticRandom.hpp"
<|file_sep|>original/es-general/Registration.cpp
{
// Register systems
registerSystem_ConstantRotation();
registerSystem_ClickBox2D();
// Register components
core.registerComponent<ConstantRotation>();
core.registerComponent<Transform>();
core.registerComponent<CameraSelect>();
core.registerComponent<ClickBox2D>();
core.registerComponent<StaticMouseInput>();
core.registerComponent<StaticKeyboardInput>();
core.registerComponent<StaticScreenDims>();
core.registerComponent<StaticGlobalTime>();
core.registerComponent<StaticCamera>();
core.registerComponent<StaticOrthoCamera>();
core.registerComponent<StaticObjRefID>();
}
} // namespace gen
<|file_sep|>current/es-general/Registration.cpp
{
// Register systems
registerSystem_ConstantRotation();
registerSystem_ClickBox2D();
// Register components
core.registerComponent<ConstantRotation>();
core.registerComponent<Transform>();
core.registerComponent<CameraSelect>();
core.registerComponent<ClickBox2D>();
core.registerComponent<StaticMouseInput>();
core.registerComponent<StaticKeyboardInput>();
core.registerComponent<StaticScreenDims>();
core.registerComponent<StaticGlobalTime>();
core.registerComponent<StaticCamera>();
core.registerComponent<StaticOrthoCamera>();
core.registerComponent<StaticObjRefID>();
}
} // namespace gen
<|file_sep|>updated/es-general/Registration.cpp | // Register systems
registerSystem_ConstantRotation();
registerSystem_ClickBox2D();
// Register components
core.registerComponent<ConstantRotation>();
core.registerComponent<Transform>();
core.registerComponent<CameraSelect>();
core.registerComponent<ClickBox2D>();
core.registerComponent<StaticMouseInput>();
core.registerComponent<StaticKeyboardInput>();
core.registerComponent<StaticScreenDims>();
core.registerComponent<StaticGlobalTime>();
core.registerComponent<StaticCamera>();
core.registerComponent<StaticOrthoCamera>();
core.registerComponent<StaticObjRefID>();
core.registerComponent<StaticRandom>();
}
} // namespace gen
| es-general/Registration.cpp | C++ | 8a9cbc1beeb7fba439fc9f434a45dae85e27daaf | <|file_sep|>es-general/Registration.cpp.diff
original:
updated:
#include "comp/StaticRandom.hpp"
<|file_sep|>original/es-general/Registration.cpp
{
// Register systems
registerSystem_ConstantRotation();
registerSystem_ClickBox2D();
// Register components
core.registerComponent<ConstantRotation>();
core.registerComponent<Transform>();
core.registerComponent<CameraSelect>();
core.registerComponent<ClickBox2D>();
core.registerComponent<StaticMouseInput>();
core.registerComponent<StaticKeyboardInput>();
core.registerComponent<StaticScreenDims>();
core.registerComponent<StaticGlobalTime>();
core.registerComponent<StaticCamera>();
core.registerComponent<StaticOrthoCamera>();
core.registerComponent<StaticObjRefID>();
}
} // namespace gen
<|file_sep|>current/es-general/Registration.cpp
{
// Register systems
registerSystem_ConstantRotation();
registerSystem_ClickBox2D();
// Register components
core.registerComponent<ConstantRotation>();
core.registerComponent<Transform>();
core.registerComponent<CameraSelect>();
core.registerComponent<ClickBox2D>();
core.registerComponent<StaticMouseInput>();
core.registerComponent<StaticKeyboardInput>();
core.registerComponent<StaticScreenDims>();
core.registerComponent<StaticGlobalTime>();
core.registerComponent<StaticCamera>();
core.registerComponent<StaticOrthoCamera>();
core.registerComponent<StaticObjRefID>();
}
} // namespace gen
<|file_sep|>updated/es-general/Registration.cpp
// Register systems
registerSystem_ConstantRotation();
registerSystem_ClickBox2D();
// Register components
core.registerComponent<ConstantRotation>();
core.registerComponent<Transform>();
core.registerComponent<CameraSelect>();
core.registerComponent<ClickBox2D>();
core.registerComponent<StaticMouseInput>();
core.registerComponent<StaticKeyboardInput>();
core.registerComponent<StaticScreenDims>();
core.registerComponent<StaticGlobalTime>();
core.registerComponent<StaticCamera>();
core.registerComponent<StaticOrthoCamera>();
core.registerComponent<StaticObjRefID>();
core.registerComponent<StaticRandom>();
}
} // namespace gen
|
<|file_sep|>base/android/important_file_writer_android.cc.diff
original:
updated:
#include "base/threading/thread_restrictions.h"
<|file_sep|>original/base/android/important_file_writer_android.cc
#include "base/files/important_file_writer.h"
#include "jni/ImportantFileWriterAndroid_jni.h"
namespace base {
namespace android {
static jboolean WriteFileAtomically(JNIEnv* env,
jclass /* clazz */,
jstring file_name,
jbyteArray data) {
std::string native_file_name;
base::android::ConvertJavaStringToUTF8(env, file_name, &native_file_name);
base::FilePath path(native_file_name);
int data_length = env->GetArrayLength(data);
jbyte* native_data = env->GetByteArrayElements(data, NULL);
std::string native_data_string(reinterpret_cast<char *>(native_data),
data_length);
bool result = base::ImportantFileWriter::WriteFileAtomically(
path, native_data_string);
env->ReleaseByteArrayElements(data, native_data, JNI_ABORT);
return result;
<|file_sep|>current/base/android/important_file_writer_android.cc
#include "base/files/important_file_writer.h"
#include "base/threading/thread_restrictions.h"
#include "jni/ImportantFileWriterAndroid_jni.h"
namespace base {
namespace android {
static jboolean WriteFileAtomically(JNIEnv* env,
jclass /* clazz */,
jstring file_name,
jbyteArray data) {
std::string native_file_name;
base::android::ConvertJavaStringToUTF8(env, file_name, &native_file_name);
base::FilePath path(native_file_name);
int data_length = env->GetArrayLength(data);
jbyte* native_data = env->GetByteArrayElements(data, NULL);
std::string native_data_string(reinterpret_cast<char *>(native_data),
data_length);
bool result = base::ImportantFileWriter::WriteFileAtomically(
path, native_data_string);
env->ReleaseByteArrayElements(data, native_data, JNI_ABORT);
<|file_sep|>updated/base/android/important_file_writer_android.cc | #include "jni/ImportantFileWriterAndroid_jni.h"
namespace base {
namespace android {
static jboolean WriteFileAtomically(JNIEnv* env,
jclass /* clazz */,
jstring file_name,
jbyteArray data) {
// This is called on the UI thread during shutdown to save tab data, so
// needs to enable IO.
base::ThreadRestrictions::ScopedAllowIO();
std::string native_file_name;
base::android::ConvertJavaStringToUTF8(env, file_name, &native_file_name);
base::FilePath path(native_file_name);
int data_length = env->GetArrayLength(data);
jbyte* native_data = env->GetByteArrayElements(data, NULL);
std::string native_data_string(reinterpret_cast<char *>(native_data),
data_length);
bool result = base::ImportantFileWriter::WriteFileAtomically(
path, native_data_string); | base/android/important_file_writer_android.cc | C++ | 4ecbb8f86691102f2a1162677ce091d3de8c5888 | <|file_sep|>base/android/important_file_writer_android.cc.diff
original:
updated:
#include "base/threading/thread_restrictions.h"
<|file_sep|>original/base/android/important_file_writer_android.cc
#include "base/files/important_file_writer.h"
#include "jni/ImportantFileWriterAndroid_jni.h"
namespace base {
namespace android {
static jboolean WriteFileAtomically(JNIEnv* env,
jclass /* clazz */,
jstring file_name,
jbyteArray data) {
std::string native_file_name;
base::android::ConvertJavaStringToUTF8(env, file_name, &native_file_name);
base::FilePath path(native_file_name);
int data_length = env->GetArrayLength(data);
jbyte* native_data = env->GetByteArrayElements(data, NULL);
std::string native_data_string(reinterpret_cast<char *>(native_data),
data_length);
bool result = base::ImportantFileWriter::WriteFileAtomically(
path, native_data_string);
env->ReleaseByteArrayElements(data, native_data, JNI_ABORT);
return result;
<|file_sep|>current/base/android/important_file_writer_android.cc
#include "base/files/important_file_writer.h"
#include "base/threading/thread_restrictions.h"
#include "jni/ImportantFileWriterAndroid_jni.h"
namespace base {
namespace android {
static jboolean WriteFileAtomically(JNIEnv* env,
jclass /* clazz */,
jstring file_name,
jbyteArray data) {
std::string native_file_name;
base::android::ConvertJavaStringToUTF8(env, file_name, &native_file_name);
base::FilePath path(native_file_name);
int data_length = env->GetArrayLength(data);
jbyte* native_data = env->GetByteArrayElements(data, NULL);
std::string native_data_string(reinterpret_cast<char *>(native_data),
data_length);
bool result = base::ImportantFileWriter::WriteFileAtomically(
path, native_data_string);
env->ReleaseByteArrayElements(data, native_data, JNI_ABORT);
<|file_sep|>updated/base/android/important_file_writer_android.cc
#include "jni/ImportantFileWriterAndroid_jni.h"
namespace base {
namespace android {
static jboolean WriteFileAtomically(JNIEnv* env,
jclass /* clazz */,
jstring file_name,
jbyteArray data) {
// This is called on the UI thread during shutdown to save tab data, so
// needs to enable IO.
base::ThreadRestrictions::ScopedAllowIO();
std::string native_file_name;
base::android::ConvertJavaStringToUTF8(env, file_name, &native_file_name);
base::FilePath path(native_file_name);
int data_length = env->GetArrayLength(data);
jbyte* native_data = env->GetByteArrayElements(data, NULL);
std::string native_data_string(reinterpret_cast<char *>(native_data),
data_length);
bool result = base::ImportantFileWriter::WriteFileAtomically(
path, native_data_string); |
<|file_sep|>alice4/software/touchscreen_tests/ts_test1.cpp.diff
original:
updated:
static bool dragging = false;
<|file_sep|>alice4/software/touchscreen_tests/ts_test1.cpp.diff
original:
updated:
if(dragging)
printf("ERROR: START WHILE ALREADY DRAGGING\n");
dragging = true;
<|file_sep|>alice4/software/touchscreen_tests/ts_test1.cpp.diff
original:
updated:
if(!dragging)
printf("ERROR: DRAG WHILE NOT STARTED\n");
<|file_sep|>original/alice4/software/touchscreen_tests/ts_test1.cpp
TouchscreenEvent e;
while((e = touchscreen_read(&x, &y, &z)) != TOUCHSCREEN_IDLE) {
switch(e) {
case TOUCHSCREEN_START:
printf("start %d %d %f\n", x, y, z);
break;
case TOUCHSCREEN_DRAG:
printf("drag %d %d %f\n", x, y, z);
break;
case TOUCHSCREEN_STOP:
printf("stop\n");
break;
case TOUCHSCREEN_IDLE:
default:
break;
}
}
// usleep(100000);
}
}
<|file_sep|>current/alice4/software/touchscreen_tests/ts_test1.cpp
if(dragging)
printf("ERROR: START WHILE ALREADY DRAGGING\n");
dragging = true;
break;
case TOUCHSCREEN_DRAG:
printf("drag %d %d %f\n", x, y, z);
if(!dragging)
printf("ERROR: DRAG WHILE NOT STARTED\n");
break;
case TOUCHSCREEN_STOP:
printf("stop\n");
break;
case TOUCHSCREEN_IDLE:
default:
break;
}
}
// usleep(100000);
}
}
<|file_sep|>updated/alice4/software/touchscreen_tests/ts_test1.cpp | dragging = true;
break;
case TOUCHSCREEN_DRAG:
printf("drag %d %d %f\n", x, y, z);
if(!dragging)
printf("ERROR: DRAG WHILE NOT STARTED\n");
break;
case TOUCHSCREEN_STOP:
printf("stop\n");
if(!dragging)
printf("ERROR: STOP WHILE NOT STARTED\n");
dragging = false;
break;
case TOUCHSCREEN_IDLE:
default:
break;
}
}
// usleep(100000);
} | alice4/software/touchscreen_tests/ts_test1.cpp | C++ | acf916b48b9f1dbe28392aa816a87cdd85157a63 | <|file_sep|>alice4/software/touchscreen_tests/ts_test1.cpp.diff
original:
updated:
static bool dragging = false;
<|file_sep|>alice4/software/touchscreen_tests/ts_test1.cpp.diff
original:
updated:
if(dragging)
printf("ERROR: START WHILE ALREADY DRAGGING\n");
dragging = true;
<|file_sep|>alice4/software/touchscreen_tests/ts_test1.cpp.diff
original:
updated:
if(!dragging)
printf("ERROR: DRAG WHILE NOT STARTED\n");
<|file_sep|>original/alice4/software/touchscreen_tests/ts_test1.cpp
TouchscreenEvent e;
while((e = touchscreen_read(&x, &y, &z)) != TOUCHSCREEN_IDLE) {
switch(e) {
case TOUCHSCREEN_START:
printf("start %d %d %f\n", x, y, z);
break;
case TOUCHSCREEN_DRAG:
printf("drag %d %d %f\n", x, y, z);
break;
case TOUCHSCREEN_STOP:
printf("stop\n");
break;
case TOUCHSCREEN_IDLE:
default:
break;
}
}
// usleep(100000);
}
}
<|file_sep|>current/alice4/software/touchscreen_tests/ts_test1.cpp
if(dragging)
printf("ERROR: START WHILE ALREADY DRAGGING\n");
dragging = true;
break;
case TOUCHSCREEN_DRAG:
printf("drag %d %d %f\n", x, y, z);
if(!dragging)
printf("ERROR: DRAG WHILE NOT STARTED\n");
break;
case TOUCHSCREEN_STOP:
printf("stop\n");
break;
case TOUCHSCREEN_IDLE:
default:
break;
}
}
// usleep(100000);
}
}
<|file_sep|>updated/alice4/software/touchscreen_tests/ts_test1.cpp
dragging = true;
break;
case TOUCHSCREEN_DRAG:
printf("drag %d %d %f\n", x, y, z);
if(!dragging)
printf("ERROR: DRAG WHILE NOT STARTED\n");
break;
case TOUCHSCREEN_STOP:
printf("stop\n");
if(!dragging)
printf("ERROR: STOP WHILE NOT STARTED\n");
dragging = false;
break;
case TOUCHSCREEN_IDLE:
default:
break;
}
}
// usleep(100000);
} |
<|file_sep|>language.support/support.types/offsetof.pass.cpp.diff
original:
updated:
struct A
{
int x;
};
<|file_sep|>original/language.support/support.types/offsetof.pass.cpp
//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is dual licensed under the MIT and the University of Illinois Open
// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
#include <cstddef>
#ifndef offsetof
#error offsetof not defined
#endif
int main()
{
}
<|file_sep|>current/language.support/support.types/offsetof.pass.cpp
// The LLVM Compiler Infrastructure
//
// This file is dual licensed under the MIT and the University of Illinois Open
// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
#include <cstddef>
#ifndef offsetof
#error offsetof not defined
#endif
struct A
{
int x;
};
int main()
{
}
<|file_sep|>updated/language.support/support.types/offsetof.pass.cpp | // Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
#include <cstddef>
#ifndef offsetof
#error offsetof not defined
#endif
struct A
{
int x;
};
int main()
{
#if (__has_feature(cxx_noexcept))
static_assert(noexcept(offsetof(A, x)), "");
#endif
} | language.support/support.types/offsetof.pass.cpp | C++ | cfa68bccf5b65ca4f2605dee5ffb371e3fc3af57 | <|file_sep|>language.support/support.types/offsetof.pass.cpp.diff
original:
updated:
struct A
{
int x;
};
<|file_sep|>original/language.support/support.types/offsetof.pass.cpp
//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is dual licensed under the MIT and the University of Illinois Open
// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
#include <cstddef>
#ifndef offsetof
#error offsetof not defined
#endif
int main()
{
}
<|file_sep|>current/language.support/support.types/offsetof.pass.cpp
// The LLVM Compiler Infrastructure
//
// This file is dual licensed under the MIT and the University of Illinois Open
// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
#include <cstddef>
#ifndef offsetof
#error offsetof not defined
#endif
struct A
{
int x;
};
int main()
{
}
<|file_sep|>updated/language.support/support.types/offsetof.pass.cpp
// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
#include <cstddef>
#ifndef offsetof
#error offsetof not defined
#endif
struct A
{
int x;
};
int main()
{
#if (__has_feature(cxx_noexcept))
static_assert(noexcept(offsetof(A, x)), "");
#endif
} |
End of preview. Expand in Data Studio
README.md exists but content is empty.
- Downloads last month
- 53