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(&notebook) == this->notebookTrees.end()) { this->notebookTrees[&notebook] = 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(&notebook) == this->notebookTrees.end()) { this->notebookTrees[&notebook] = 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(&notebook) == this->notebookTrees.end()) { this->notebookTrees[&notebook] = 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(&notebook) == this->notebookTrees.end()) { this->notebookTrees[&notebook] = 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(&notebook) == this->notebookTrees.end()) { this->notebookTrees[&notebook] = 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(&notebook) == this->notebookTrees.end()) { this->notebookTrees[&notebook] = 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 }
<|file_sep|>src/placement/persistent_constraint_updater.cpp.diff original: updated: #include <chrono> #include <QLoggingCategory> <|file_sep|>src/placement/persistent_constraint_updater.cpp.diff original: updated: QLoggingCategory pcuChan("Placement.PersistentConstraintUpdater"); <|file_sep|>src/placement/persistent_constraint_updater.cpp.diff original: updated: auto startTime = std::chrono::high_resolution_clock::now(); <|file_sep|>original/src/placement/persistent_constraint_updater.cpp auto &placedLabel = placedLabelPair.second; constraintUpdater->drawConstraintRegionFor( anchorForBuffer, labelSizeForBuffer, placedLabel.anchorPosition, placedLabel.labelPosition, placedLabel.size); } placedLabels[labelId] = PlacedLabelInfo{ labelSizeForBuffer, anchorForBuffer, Eigen::Vector2i(-1, -1) }; } void PersistentConstraintUpdater::setPosition(int labelId, Eigen::Vector2i position) { placedLabels[labelId].labelPosition = position; } void PersistentConstraintUpdater::clear() { placedLabels.clear(); } <|file_sep|>current/src/placement/persistent_constraint_updater.cpp for (auto &placedLabelPair : placedLabels) { auto &placedLabel = placedLabelPair.second; constraintUpdater->drawConstraintRegionFor( anchorForBuffer, labelSizeForBuffer, placedLabel.anchorPosition, placedLabel.labelPosition, placedLabel.size); } placedLabels[labelId] = PlacedLabelInfo{ labelSizeForBuffer, anchorForBuffer, Eigen::Vector2i(-1, -1) }; } void PersistentConstraintUpdater::setPosition(int labelId, Eigen::Vector2i position) { placedLabels[labelId].labelPosition = position; } void PersistentConstraintUpdater::clear() { <|file_sep|>updated/src/placement/persistent_constraint_updater.cpp
auto &placedLabel = placedLabelPair.second; constraintUpdater->drawConstraintRegionFor( anchorForBuffer, labelSizeForBuffer, placedLabel.anchorPosition, placedLabel.labelPosition, placedLabel.size); } placedLabels[labelId] = PlacedLabelInfo{ labelSizeForBuffer, anchorForBuffer, Eigen::Vector2i(-1, -1) }; auto endTime = std::chrono::high_resolution_clock::now(); std::chrono::duration<float, std::milli> diff = endTime - startTime; qCInfo(pcuChan) << "updateConstraints took" << diff.count() << "ms"; } void PersistentConstraintUpdater::setPosition(int labelId, Eigen::Vector2i position) { placedLabels[labelId].labelPosition = position; }
src/placement/persistent_constraint_updater.cpp
C++
3865fccd46223514c7ca8d23611571bf627875ab
<|file_sep|>src/placement/persistent_constraint_updater.cpp.diff original: updated: #include <chrono> #include <QLoggingCategory> <|file_sep|>src/placement/persistent_constraint_updater.cpp.diff original: updated: QLoggingCategory pcuChan("Placement.PersistentConstraintUpdater"); <|file_sep|>src/placement/persistent_constraint_updater.cpp.diff original: updated: auto startTime = std::chrono::high_resolution_clock::now(); <|file_sep|>original/src/placement/persistent_constraint_updater.cpp auto &placedLabel = placedLabelPair.second; constraintUpdater->drawConstraintRegionFor( anchorForBuffer, labelSizeForBuffer, placedLabel.anchorPosition, placedLabel.labelPosition, placedLabel.size); } placedLabels[labelId] = PlacedLabelInfo{ labelSizeForBuffer, anchorForBuffer, Eigen::Vector2i(-1, -1) }; } void PersistentConstraintUpdater::setPosition(int labelId, Eigen::Vector2i position) { placedLabels[labelId].labelPosition = position; } void PersistentConstraintUpdater::clear() { placedLabels.clear(); } <|file_sep|>current/src/placement/persistent_constraint_updater.cpp for (auto &placedLabelPair : placedLabels) { auto &placedLabel = placedLabelPair.second; constraintUpdater->drawConstraintRegionFor( anchorForBuffer, labelSizeForBuffer, placedLabel.anchorPosition, placedLabel.labelPosition, placedLabel.size); } placedLabels[labelId] = PlacedLabelInfo{ labelSizeForBuffer, anchorForBuffer, Eigen::Vector2i(-1, -1) }; } void PersistentConstraintUpdater::setPosition(int labelId, Eigen::Vector2i position) { placedLabels[labelId].labelPosition = position; } void PersistentConstraintUpdater::clear() { <|file_sep|>updated/src/placement/persistent_constraint_updater.cpp auto &placedLabel = placedLabelPair.second; constraintUpdater->drawConstraintRegionFor( anchorForBuffer, labelSizeForBuffer, placedLabel.anchorPosition, placedLabel.labelPosition, placedLabel.size); } placedLabels[labelId] = PlacedLabelInfo{ labelSizeForBuffer, anchorForBuffer, Eigen::Vector2i(-1, -1) }; auto endTime = std::chrono::high_resolution_clock::now(); std::chrono::duration<float, std::milli> diff = endTime - startTime; qCInfo(pcuChan) << "updateConstraints took" << diff.count() << "ms"; } void PersistentConstraintUpdater::setPosition(int labelId, Eigen::Vector2i position) { placedLabels[labelId].labelPosition = position; }
<|file_sep|>Magick++/fuzz/encoder_fuzzer.cc.diff original: updated: #define FUZZ_IMAGEMAGICK_ENCODER_WRITE 1 <|file_sep|>Magick++/fuzz/encoder_fuzzer.cc.diff original: updated: #if FUZZ_IMAGEMAGICK_ENCODER_WRITE <|file_sep|>original/Magick++/fuzz/encoder_fuzzer.cc extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) { const Magick::Blob blob(Data, Size); Magick::Image image; image.magick(FUZZ_ENCODER); image.fileName(std::string(FUZZ_ENCODER) + ":"); try { image.read(blob); } catch (Magick::Exception &e) { return 0; } Magick::Blob outBlob; try { image.write(&outBlob, FUZZ_ENCODER); } catch (Magick::Exception &e) { } return 0; } <|file_sep|>current/Magick++/fuzz/encoder_fuzzer.cc const Magick::Blob blob(Data, Size); Magick::Image image; image.magick(FUZZ_ENCODER); image.fileName(std::string(FUZZ_ENCODER) + ":"); try { image.read(blob); } catch (Magick::Exception &e) { return 0; } #if FUZZ_IMAGEMAGICK_ENCODER_WRITE Magick::Blob outBlob; try { image.write(&outBlob, FUZZ_ENCODER); } catch (Magick::Exception &e) { } return 0; } <|file_sep|>updated/Magick++/fuzz/encoder_fuzzer.cc
Magick::Image image; image.magick(FUZZ_ENCODER); image.fileName(std::string(FUZZ_ENCODER) + ":"); try { image.read(blob); } catch (Magick::Exception &e) { return 0; } #if FUZZ_IMAGEMAGICK_ENCODER_WRITE Magick::Blob outBlob; try { image.write(&outBlob, FUZZ_ENCODER); } catch (Magick::Exception &e) { } #endif return 0; }
Magick++/fuzz/encoder_fuzzer.cc
C++
4cc573a2327b81087eefb1eb70083486dacf58df
<|file_sep|>Magick++/fuzz/encoder_fuzzer.cc.diff original: updated: #define FUZZ_IMAGEMAGICK_ENCODER_WRITE 1 <|file_sep|>Magick++/fuzz/encoder_fuzzer.cc.diff original: updated: #if FUZZ_IMAGEMAGICK_ENCODER_WRITE <|file_sep|>original/Magick++/fuzz/encoder_fuzzer.cc extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) { const Magick::Blob blob(Data, Size); Magick::Image image; image.magick(FUZZ_ENCODER); image.fileName(std::string(FUZZ_ENCODER) + ":"); try { image.read(blob); } catch (Magick::Exception &e) { return 0; } Magick::Blob outBlob; try { image.write(&outBlob, FUZZ_ENCODER); } catch (Magick::Exception &e) { } return 0; } <|file_sep|>current/Magick++/fuzz/encoder_fuzzer.cc const Magick::Blob blob(Data, Size); Magick::Image image; image.magick(FUZZ_ENCODER); image.fileName(std::string(FUZZ_ENCODER) + ":"); try { image.read(blob); } catch (Magick::Exception &e) { return 0; } #if FUZZ_IMAGEMAGICK_ENCODER_WRITE Magick::Blob outBlob; try { image.write(&outBlob, FUZZ_ENCODER); } catch (Magick::Exception &e) { } return 0; } <|file_sep|>updated/Magick++/fuzz/encoder_fuzzer.cc Magick::Image image; image.magick(FUZZ_ENCODER); image.fileName(std::string(FUZZ_ENCODER) + ":"); try { image.read(blob); } catch (Magick::Exception &e) { return 0; } #if FUZZ_IMAGEMAGICK_ENCODER_WRITE Magick::Blob outBlob; try { image.write(&outBlob, FUZZ_ENCODER); } catch (Magick::Exception &e) { } #endif return 0; }
<|file_sep|>external/vulkancts/framework/vulkan/vkNoRenderDocUtil.cpp.diff original: updated: DE_UNREF(instance); <|file_sep|>original/external/vulkancts/framework/vulkan/vkNoRenderDocUtil.cpp { } RenderDocUtil::~RenderDocUtil (void) { } bool RenderDocUtil::isValid (void) { return false; } void RenderDocUtil::startFrame (vk::VkInstance instance) { } void RenderDocUtil::endFrame (vk::VkInstance instance) { } } // vk <|file_sep|>current/external/vulkancts/framework/vulkan/vkNoRenderDocUtil.cpp } RenderDocUtil::~RenderDocUtil (void) { } bool RenderDocUtil::isValid (void) { return false; } void RenderDocUtil::startFrame (vk::VkInstance instance) { DE_UNREF(instance); } void RenderDocUtil::endFrame (vk::VkInstance instance) { } } // vk <|file_sep|>updated/external/vulkancts/framework/vulkan/vkNoRenderDocUtil.cpp
RenderDocUtil::~RenderDocUtil (void) { } bool RenderDocUtil::isValid (void) { return false; } void RenderDocUtil::startFrame (vk::VkInstance instance) { DE_UNREF(instance); } void RenderDocUtil::endFrame (vk::VkInstance instance) { DE_UNREF(instance); } } // vk
external/vulkancts/framework/vulkan/vkNoRenderDocUtil.cpp
C++
f6d4c9d8c0ce4ec6d9487129f6c14ee5a3fbcf1f
<|file_sep|>external/vulkancts/framework/vulkan/vkNoRenderDocUtil.cpp.diff original: updated: DE_UNREF(instance); <|file_sep|>original/external/vulkancts/framework/vulkan/vkNoRenderDocUtil.cpp { } RenderDocUtil::~RenderDocUtil (void) { } bool RenderDocUtil::isValid (void) { return false; } void RenderDocUtil::startFrame (vk::VkInstance instance) { } void RenderDocUtil::endFrame (vk::VkInstance instance) { } } // vk <|file_sep|>current/external/vulkancts/framework/vulkan/vkNoRenderDocUtil.cpp } RenderDocUtil::~RenderDocUtil (void) { } bool RenderDocUtil::isValid (void) { return false; } void RenderDocUtil::startFrame (vk::VkInstance instance) { DE_UNREF(instance); } void RenderDocUtil::endFrame (vk::VkInstance instance) { } } // vk <|file_sep|>updated/external/vulkancts/framework/vulkan/vkNoRenderDocUtil.cpp RenderDocUtil::~RenderDocUtil (void) { } bool RenderDocUtil::isValid (void) { return false; } void RenderDocUtil::startFrame (vk::VkInstance instance) { DE_UNREF(instance); } void RenderDocUtil::endFrame (vk::VkInstance instance) { DE_UNREF(instance); } } // vk
<|file_sep|>sandbox/linux/seccomp-bpf/trap_unittest.cc.diff original: updated: #if !defined(THREAD_SANITIZER) <|file_sep|>original/sandbox/linux/seccomp-bpf/trap_unittest.cc #include "sandbox/linux/tests/unit_tests.h" #include "testing/gtest/include/gtest/gtest.h" namespace sandbox { namespace { SANDBOX_TEST_ALLOW_NOISE(Trap, SigSysAction) { // This creates a global Trap instance, and registers the signal handler // (Trap::SigSysAction). Trap::Registry(); // Send SIGSYS to self. If signal handler (SigSysAction) is not registered, // the process will be terminated with status code -SIGSYS. // Note that, SigSysAction handler would output an error message // "Unexpected SIGSYS received." so it is necessary to allow the noise. raise(SIGSYS); } } // namespace } // namespace sandbox <|file_sep|>current/sandbox/linux/seccomp-bpf/trap_unittest.cc #include "sandbox/linux/tests/unit_tests.h" #include "testing/gtest/include/gtest/gtest.h" namespace sandbox { namespace { #if !defined(THREAD_SANITIZER) SANDBOX_TEST_ALLOW_NOISE(Trap, SigSysAction) { // This creates a global Trap instance, and registers the signal handler // (Trap::SigSysAction). Trap::Registry(); // Send SIGSYS to self. If signal handler (SigSysAction) is not registered, // the process will be terminated with status code -SIGSYS. // Note that, SigSysAction handler would output an error message // "Unexpected SIGSYS received." so it is necessary to allow the noise. raise(SIGSYS); } } // namespace } // namespace sandbox <|file_sep|>updated/sandbox/linux/seccomp-bpf/trap_unittest.cc
#include "testing/gtest/include/gtest/gtest.h" namespace sandbox { namespace { #if !defined(THREAD_SANITIZER) SANDBOX_TEST_ALLOW_NOISE(Trap, SigSysAction) { // This creates a global Trap instance, and registers the signal handler // (Trap::SigSysAction). Trap::Registry(); // Send SIGSYS to self. If signal handler (SigSysAction) is not registered, // the process will be terminated with status code -SIGSYS. // Note that, SigSysAction handler would output an error message // "Unexpected SIGSYS received." so it is necessary to allow the noise. raise(SIGSYS); } #endif } // namespace } // namespace sandbox
sandbox/linux/seccomp-bpf/trap_unittest.cc
C++
6f76a1e81c7cd76d5c9c43dbd3b894e89c6a25d2
<|file_sep|>sandbox/linux/seccomp-bpf/trap_unittest.cc.diff original: updated: #if !defined(THREAD_SANITIZER) <|file_sep|>original/sandbox/linux/seccomp-bpf/trap_unittest.cc #include "sandbox/linux/tests/unit_tests.h" #include "testing/gtest/include/gtest/gtest.h" namespace sandbox { namespace { SANDBOX_TEST_ALLOW_NOISE(Trap, SigSysAction) { // This creates a global Trap instance, and registers the signal handler // (Trap::SigSysAction). Trap::Registry(); // Send SIGSYS to self. If signal handler (SigSysAction) is not registered, // the process will be terminated with status code -SIGSYS. // Note that, SigSysAction handler would output an error message // "Unexpected SIGSYS received." so it is necessary to allow the noise. raise(SIGSYS); } } // namespace } // namespace sandbox <|file_sep|>current/sandbox/linux/seccomp-bpf/trap_unittest.cc #include "sandbox/linux/tests/unit_tests.h" #include "testing/gtest/include/gtest/gtest.h" namespace sandbox { namespace { #if !defined(THREAD_SANITIZER) SANDBOX_TEST_ALLOW_NOISE(Trap, SigSysAction) { // This creates a global Trap instance, and registers the signal handler // (Trap::SigSysAction). Trap::Registry(); // Send SIGSYS to self. If signal handler (SigSysAction) is not registered, // the process will be terminated with status code -SIGSYS. // Note that, SigSysAction handler would output an error message // "Unexpected SIGSYS received." so it is necessary to allow the noise. raise(SIGSYS); } } // namespace } // namespace sandbox <|file_sep|>updated/sandbox/linux/seccomp-bpf/trap_unittest.cc #include "testing/gtest/include/gtest/gtest.h" namespace sandbox { namespace { #if !defined(THREAD_SANITIZER) SANDBOX_TEST_ALLOW_NOISE(Trap, SigSysAction) { // This creates a global Trap instance, and registers the signal handler // (Trap::SigSysAction). Trap::Registry(); // Send SIGSYS to self. If signal handler (SigSysAction) is not registered, // the process will be terminated with status code -SIGSYS. // Note that, SigSysAction handler would output an error message // "Unexpected SIGSYS received." so it is necessary to allow the noise. raise(SIGSYS); } #endif } // namespace } // namespace sandbox
<|file_sep|>Code/Apps/mpMyFirstApp.cpp.diff original: updated: #include <boost/date_time/posix_time/posix_time.hpp> #include <boost/filesystem/path.hpp> <|file_sep|>original/Code/Apps/mpMyFirstApp.cpp int main(int argc, char** argv) { #ifdef BUILD_Eigen Eigen::MatrixXd m(2,2); std::cout << "Printing 2x2 matrix ..." << m << std::endl; #endif #ifdef BUILD_Boost std::cout << "Rounding to ... " << boost::math::round(0.123) << std::endl; #endif #ifdef BUILD_OpenCV cv::Matx44d matrix = cv::Matx44d::eye(); std::cout << "Printing 4x4 matrix ..." << matrix << std::endl; #endif std::cout << "Calculating ... " << mp::MyFirstFunction(1) << std::endl; return 0; } <|file_sep|>current/Code/Apps/mpMyFirstApp.cpp int main(int argc, char** argv) { #ifdef BUILD_Eigen Eigen::MatrixXd m(2,2); std::cout << "Printing 2x2 matrix ..." << m << std::endl; #endif #ifdef BUILD_Boost std::cout << "Rounding to ... " << boost::math::round(0.123) << std::endl; #endif #ifdef BUILD_OpenCV cv::Matx44d matrix = cv::Matx44d::eye(); std::cout << "Printing 4x4 matrix ..." << matrix << std::endl; #endif std::cout << "Calculating ... " << mp::MyFirstFunction(1) << std::endl; return 0; } <|file_sep|>updated/Code/Apps/mpMyFirstApp.cpp
int main(int argc, char** argv) { #ifdef BUILD_Eigen Eigen::MatrixXd m(2,2); std::cout << "Printing 2x2 matrix ..." << m << std::endl; #endif #ifdef BUILD_Boost std::cout << "Rounding to ... " << boost::math::round(0.123) << std::endl; boost::posix_time::ptime startTime = boost::posix_time::second_clock::local_time(); boost::filesystem::path pathname( "/tmp/tmp.txt" ); #endif #ifdef BUILD_OpenCV cv::Matx44d matrix = cv::Matx44d::eye(); std::cout << "Printing 4x4 matrix ..." << matrix << std::endl; #endif std::cout << "Calculating ... " << mp::MyFirstFunction(1) << std::endl; return 0;
Code/Apps/mpMyFirstApp.cpp
C++
b68ab1d5e02914932fa2f73100297e4c88821688
<|file_sep|>Code/Apps/mpMyFirstApp.cpp.diff original: updated: #include <boost/date_time/posix_time/posix_time.hpp> #include <boost/filesystem/path.hpp> <|file_sep|>original/Code/Apps/mpMyFirstApp.cpp int main(int argc, char** argv) { #ifdef BUILD_Eigen Eigen::MatrixXd m(2,2); std::cout << "Printing 2x2 matrix ..." << m << std::endl; #endif #ifdef BUILD_Boost std::cout << "Rounding to ... " << boost::math::round(0.123) << std::endl; #endif #ifdef BUILD_OpenCV cv::Matx44d matrix = cv::Matx44d::eye(); std::cout << "Printing 4x4 matrix ..." << matrix << std::endl; #endif std::cout << "Calculating ... " << mp::MyFirstFunction(1) << std::endl; return 0; } <|file_sep|>current/Code/Apps/mpMyFirstApp.cpp int main(int argc, char** argv) { #ifdef BUILD_Eigen Eigen::MatrixXd m(2,2); std::cout << "Printing 2x2 matrix ..." << m << std::endl; #endif #ifdef BUILD_Boost std::cout << "Rounding to ... " << boost::math::round(0.123) << std::endl; #endif #ifdef BUILD_OpenCV cv::Matx44d matrix = cv::Matx44d::eye(); std::cout << "Printing 4x4 matrix ..." << matrix << std::endl; #endif std::cout << "Calculating ... " << mp::MyFirstFunction(1) << std::endl; return 0; } <|file_sep|>updated/Code/Apps/mpMyFirstApp.cpp int main(int argc, char** argv) { #ifdef BUILD_Eigen Eigen::MatrixXd m(2,2); std::cout << "Printing 2x2 matrix ..." << m << std::endl; #endif #ifdef BUILD_Boost std::cout << "Rounding to ... " << boost::math::round(0.123) << std::endl; boost::posix_time::ptime startTime = boost::posix_time::second_clock::local_time(); boost::filesystem::path pathname( "/tmp/tmp.txt" ); #endif #ifdef BUILD_OpenCV cv::Matx44d matrix = cv::Matx44d::eye(); std::cout << "Printing 4x4 matrix ..." << matrix << std::endl; #endif std::cout << "Calculating ... " << mp::MyFirstFunction(1) << std::endl; return 0;
<|file_sep|>src/vmm/src/lib/CxxAbi.cpp.diff original: updated: #include <os/Board.h> #include <cstdio> <|file_sep|>original/src/vmm/src/lib/CxxAbi.cpp #include <cstdlib> extern "C" void __cxa_pure_virtual() { } void* operator new(size_t size) { return malloc(size); } void* operator new[](size_t size) { return malloc(size); } void operator delete(void *ptr) { free(ptr); } <|file_sep|>current/src/vmm/src/lib/CxxAbi.cpp #include <os/Board.h> #include <cstdio> #include <cstdlib> extern "C" void __cxa_pure_virtual() { } void* operator new(size_t size) { return malloc(size); } void* operator new[](size_t size) { return malloc(size); } void operator delete(void *ptr) { <|file_sep|>updated/src/vmm/src/lib/CxxAbi.cpp
#include <os/Board.h> #include <cstdio> #include <cstdlib> extern "C" void __cxa_pure_virtual() { printf("__cxa_pure_virtual() called. Probably a bad build.\n"); os::board::shutdown(); } void* operator new(size_t size) { return malloc(size); } void* operator new[](size_t size) { return malloc(size); }
src/vmm/src/lib/CxxAbi.cpp
C++
067d9be9210df8fe7af40063295d175a91284f36
<|file_sep|>src/vmm/src/lib/CxxAbi.cpp.diff original: updated: #include <os/Board.h> #include <cstdio> <|file_sep|>original/src/vmm/src/lib/CxxAbi.cpp #include <cstdlib> extern "C" void __cxa_pure_virtual() { } void* operator new(size_t size) { return malloc(size); } void* operator new[](size_t size) { return malloc(size); } void operator delete(void *ptr) { free(ptr); } <|file_sep|>current/src/vmm/src/lib/CxxAbi.cpp #include <os/Board.h> #include <cstdio> #include <cstdlib> extern "C" void __cxa_pure_virtual() { } void* operator new(size_t size) { return malloc(size); } void* operator new[](size_t size) { return malloc(size); } void operator delete(void *ptr) { <|file_sep|>updated/src/vmm/src/lib/CxxAbi.cpp #include <os/Board.h> #include <cstdio> #include <cstdlib> extern "C" void __cxa_pure_virtual() { printf("__cxa_pure_virtual() called. Probably a bad build.\n"); os::board::shutdown(); } void* operator new(size_t size) { return malloc(size); } void* operator new[](size_t size) { return malloc(size); }
<|file_sep|>framework/extensions.cpp.diff original: updated: #include "extensions/geolocation.h" <|file_sep|>original/framework/extensions.cpp Extensions::Extensions(QWebView *webView) : QObject(webView) { m_frame = webView->page()->mainFrame(); connect(m_frame, SIGNAL(javaScriptWindowObjectCleared()), SLOT(attachExtensions())); m_extensions["GapAccelerometer"] = new Accelerometer(this); m_extensions["GapDebugConsole"] = new DebugConsole(this); m_extensions["GapDeviceInfo"] = new DeviceInfo(this); m_extensions["GapHash"] = new Hash(this); m_extensions["GapNotification"] = new Notification(this); #ifdef Q_WS_S60 m_extensions["GapCamera"] = new Camera(this); m_extensions["GapMemoryWatcher"] = new MemoryWatcher(this); #endif attachExtensions(); } <|file_sep|>current/framework/extensions.cpp Extensions::Extensions(QWebView *webView) : QObject(webView) { m_frame = webView->page()->mainFrame(); connect(m_frame, SIGNAL(javaScriptWindowObjectCleared()), SLOT(attachExtensions())); m_extensions["GapAccelerometer"] = new Accelerometer(this); m_extensions["GapDebugConsole"] = new DebugConsole(this); m_extensions["GapDeviceInfo"] = new DeviceInfo(this); m_extensions["GapHash"] = new Hash(this); m_extensions["GapNotification"] = new Notification(this); #ifdef Q_WS_S60 m_extensions["GapCamera"] = new Camera(this); m_extensions["GapMemoryWatcher"] = new MemoryWatcher(this); #endif attachExtensions(); } <|file_sep|>updated/framework/extensions.cpp
Extensions::Extensions(QWebView *webView) : QObject(webView) { m_frame = webView->page()->mainFrame(); connect(m_frame, SIGNAL(javaScriptWindowObjectCleared()), SLOT(attachExtensions())); m_extensions["GapAccelerometer"] = new Accelerometer(this); m_extensions["GapDebugConsole"] = new DebugConsole(this); m_extensions["GapDeviceInfo"] = new DeviceInfo(this); m_extensions["GapGeolocation"] = new Geolocation(this); m_extensions["GapHash"] = new Hash(this); m_extensions["GapNotification"] = new Notification(this); #ifdef Q_WS_S60 m_extensions["GapCamera"] = new Camera(this); m_extensions["GapMemoryWatcher"] = new MemoryWatcher(this); #endif attachExtensions(); }
framework/extensions.cpp
C++
4f2258154251645d694823aed71827586a4c3a3e
<|file_sep|>framework/extensions.cpp.diff original: updated: #include "extensions/geolocation.h" <|file_sep|>original/framework/extensions.cpp Extensions::Extensions(QWebView *webView) : QObject(webView) { m_frame = webView->page()->mainFrame(); connect(m_frame, SIGNAL(javaScriptWindowObjectCleared()), SLOT(attachExtensions())); m_extensions["GapAccelerometer"] = new Accelerometer(this); m_extensions["GapDebugConsole"] = new DebugConsole(this); m_extensions["GapDeviceInfo"] = new DeviceInfo(this); m_extensions["GapHash"] = new Hash(this); m_extensions["GapNotification"] = new Notification(this); #ifdef Q_WS_S60 m_extensions["GapCamera"] = new Camera(this); m_extensions["GapMemoryWatcher"] = new MemoryWatcher(this); #endif attachExtensions(); } <|file_sep|>current/framework/extensions.cpp Extensions::Extensions(QWebView *webView) : QObject(webView) { m_frame = webView->page()->mainFrame(); connect(m_frame, SIGNAL(javaScriptWindowObjectCleared()), SLOT(attachExtensions())); m_extensions["GapAccelerometer"] = new Accelerometer(this); m_extensions["GapDebugConsole"] = new DebugConsole(this); m_extensions["GapDeviceInfo"] = new DeviceInfo(this); m_extensions["GapHash"] = new Hash(this); m_extensions["GapNotification"] = new Notification(this); #ifdef Q_WS_S60 m_extensions["GapCamera"] = new Camera(this); m_extensions["GapMemoryWatcher"] = new MemoryWatcher(this); #endif attachExtensions(); } <|file_sep|>updated/framework/extensions.cpp Extensions::Extensions(QWebView *webView) : QObject(webView) { m_frame = webView->page()->mainFrame(); connect(m_frame, SIGNAL(javaScriptWindowObjectCleared()), SLOT(attachExtensions())); m_extensions["GapAccelerometer"] = new Accelerometer(this); m_extensions["GapDebugConsole"] = new DebugConsole(this); m_extensions["GapDeviceInfo"] = new DeviceInfo(this); m_extensions["GapGeolocation"] = new Geolocation(this); m_extensions["GapHash"] = new Hash(this); m_extensions["GapNotification"] = new Notification(this); #ifdef Q_WS_S60 m_extensions["GapCamera"] = new Camera(this); m_extensions["GapMemoryWatcher"] = new MemoryWatcher(this); #endif attachExtensions(); }
<|file_sep|>browser/browser_main_parts.cc.diff original: updated: #include "ui/gfx/screen.h" #include "ui/views/widget/desktop_aura/desktop_screen.h" <|file_sep|>original/browser/browser_main_parts.cc void BrowserMainParts::PreMainMessageLoopRun() { browser_context_.reset(CreateBrowserContext()); browser_context_->Initialize(); web_ui_controller_factory_.reset( new WebUIControllerFactory(browser_context_.get())); content::WebUIControllerFactory::RegisterFactory( web_ui_controller_factory_.get()); } void BrowserMainParts::PostMainMessageLoopRun() { browser_context_.reset(); } int BrowserMainParts::PreCreateThreads() { #if defined(OS_WIN) net::ProxyResolverV8::CreateIsolate(); #else net::ProxyResolverV8::RememberDefaultIsolate(); #endif <|file_sep|>current/browser/browser_main_parts.cc BrowserMainParts::~BrowserMainParts() { } void BrowserMainParts::PreMainMessageLoopRun() { browser_context_.reset(CreateBrowserContext()); browser_context_->Initialize(); web_ui_controller_factory_.reset( new WebUIControllerFactory(browser_context_.get())); content::WebUIControllerFactory::RegisterFactory( web_ui_controller_factory_.get()); } void BrowserMainParts::PostMainMessageLoopRun() { browser_context_.reset(); } int BrowserMainParts::PreCreateThreads() { #if defined(OS_WIN) net::ProxyResolverV8::CreateIsolate(); #else <|file_sep|>updated/browser/browser_main_parts.cc
void BrowserMainParts::PreMainMessageLoopRun() { browser_context_.reset(CreateBrowserContext()); browser_context_->Initialize(); web_ui_controller_factory_.reset( new WebUIControllerFactory(browser_context_.get())); content::WebUIControllerFactory::RegisterFactory( web_ui_controller_factory_.get()); #if defined(OS_WIN) gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, views::CreateDesktopScreen()); #endif } void BrowserMainParts::PostMainMessageLoopRun() { browser_context_.reset(); } int BrowserMainParts::PreCreateThreads() { #if defined(OS_WIN)
browser/browser_main_parts.cc
C++
38a0b27483c990eb504ffec0711202b0ba489f76
<|file_sep|>browser/browser_main_parts.cc.diff original: updated: #include "ui/gfx/screen.h" #include "ui/views/widget/desktop_aura/desktop_screen.h" <|file_sep|>original/browser/browser_main_parts.cc void BrowserMainParts::PreMainMessageLoopRun() { browser_context_.reset(CreateBrowserContext()); browser_context_->Initialize(); web_ui_controller_factory_.reset( new WebUIControllerFactory(browser_context_.get())); content::WebUIControllerFactory::RegisterFactory( web_ui_controller_factory_.get()); } void BrowserMainParts::PostMainMessageLoopRun() { browser_context_.reset(); } int BrowserMainParts::PreCreateThreads() { #if defined(OS_WIN) net::ProxyResolverV8::CreateIsolate(); #else net::ProxyResolverV8::RememberDefaultIsolate(); #endif <|file_sep|>current/browser/browser_main_parts.cc BrowserMainParts::~BrowserMainParts() { } void BrowserMainParts::PreMainMessageLoopRun() { browser_context_.reset(CreateBrowserContext()); browser_context_->Initialize(); web_ui_controller_factory_.reset( new WebUIControllerFactory(browser_context_.get())); content::WebUIControllerFactory::RegisterFactory( web_ui_controller_factory_.get()); } void BrowserMainParts::PostMainMessageLoopRun() { browser_context_.reset(); } int BrowserMainParts::PreCreateThreads() { #if defined(OS_WIN) net::ProxyResolverV8::CreateIsolate(); #else <|file_sep|>updated/browser/browser_main_parts.cc void BrowserMainParts::PreMainMessageLoopRun() { browser_context_.reset(CreateBrowserContext()); browser_context_->Initialize(); web_ui_controller_factory_.reset( new WebUIControllerFactory(browser_context_.get())); content::WebUIControllerFactory::RegisterFactory( web_ui_controller_factory_.get()); #if defined(OS_WIN) gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, views::CreateDesktopScreen()); #endif } void BrowserMainParts::PostMainMessageLoopRun() { browser_context_.reset(); } int BrowserMainParts::PreCreateThreads() { #if defined(OS_WIN)
<|file_sep|>test/language.support/support.types/offsetof.pass.cpp.diff original: updated: struct A { int x; }; <|file_sep|>original/test/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/test/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/test/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 }
test/language.support/support.types/offsetof.pass.cpp
C++
71499ad1763cd977ad80fa92f3782971c7b4e14c
<|file_sep|>test/language.support/support.types/offsetof.pass.cpp.diff original: updated: struct A { int x; }; <|file_sep|>original/test/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/test/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/test/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 }
<|file_sep|>src/zcash/GenerateParams.cpp.diff original: updated: #include "sodium.h" <|file_sep|>original/src/zcash/GenerateParams.cpp #include "zcash/JoinSplit.hpp" #include <iostream> int main(int argc, char **argv) { if(argc != 3) { std::cerr << "Usage: " << argv[0] << " provingKeyFileName verificationKeyFileName" << std::endl; return 1; } std::string pkFile = argv[1]; std::string vkFile = argv[2]; auto p = ZCJoinSplit::Generate(); p->saveProvingKey(pkFile); p->saveVerifyingKey(vkFile); return 0; } <|file_sep|>current/src/zcash/GenerateParams.cpp #include "zcash/JoinSplit.hpp" #include <iostream> #include "sodium.h" int main(int argc, char **argv) { if(argc != 3) { std::cerr << "Usage: " << argv[0] << " provingKeyFileName verificationKeyFileName" << std::endl; return 1; } std::string pkFile = argv[1]; std::string vkFile = argv[2]; auto p = ZCJoinSplit::Generate(); p->saveProvingKey(pkFile); p->saveVerifyingKey(vkFile); return 0; <|file_sep|>updated/src/zcash/GenerateParams.cpp
#include "zcash/JoinSplit.hpp" #include <iostream> #include "sodium.h" int main(int argc, char **argv) { if (sodium_init() == -1) { return 1; } if(argc != 3) { std::cerr << "Usage: " << argv[0] << " provingKeyFileName verificationKeyFileName" << std::endl; return 1; } std::string pkFile = argv[1]; std::string vkFile = argv[2]; auto p = ZCJoinSplit::Generate();
src/zcash/GenerateParams.cpp
C++
1fad6b87e5076974168349cf2e28472922ec592c
<|file_sep|>src/zcash/GenerateParams.cpp.diff original: updated: #include "sodium.h" <|file_sep|>original/src/zcash/GenerateParams.cpp #include "zcash/JoinSplit.hpp" #include <iostream> int main(int argc, char **argv) { if(argc != 3) { std::cerr << "Usage: " << argv[0] << " provingKeyFileName verificationKeyFileName" << std::endl; return 1; } std::string pkFile = argv[1]; std::string vkFile = argv[2]; auto p = ZCJoinSplit::Generate(); p->saveProvingKey(pkFile); p->saveVerifyingKey(vkFile); return 0; } <|file_sep|>current/src/zcash/GenerateParams.cpp #include "zcash/JoinSplit.hpp" #include <iostream> #include "sodium.h" int main(int argc, char **argv) { if(argc != 3) { std::cerr << "Usage: " << argv[0] << " provingKeyFileName verificationKeyFileName" << std::endl; return 1; } std::string pkFile = argv[1]; std::string vkFile = argv[2]; auto p = ZCJoinSplit::Generate(); p->saveProvingKey(pkFile); p->saveVerifyingKey(vkFile); return 0; <|file_sep|>updated/src/zcash/GenerateParams.cpp #include "zcash/JoinSplit.hpp" #include <iostream> #include "sodium.h" int main(int argc, char **argv) { if (sodium_init() == -1) { return 1; } if(argc != 3) { std::cerr << "Usage: " << argv[0] << " provingKeyFileName verificationKeyFileName" << std::endl; return 1; } std::string pkFile = argv[1]; std::string vkFile = argv[2]; auto p = ZCJoinSplit::Generate();
<|file_sep|>agent/src/main.cpp.diff original: updated: #include "network/sniffer/SnifferManager.hpp" <|file_sep|>original/agent/src/main.cpp #include "controllers/main/MainModule.hpp" #include "network/bsdsocket/Manager.hpp" int main() { tin::controllers::main::ControllerQueue ctrlQueue; tin::network::bsdsocket::ManagerQueue netManagerQueue; tin::controllers::main::MainModule mainCtrl(ctrlQueue, netManagerQueue); tin::network::bsdsocket::Manager networkManager(netManagerQueue, ctrlQueue, 3333); std::cout << "Hello agent!\n"; auto mainCtrlThread = mainCtrl.createThread(); auto netManager = networkManager.createThread(); try { mainCtrlThread.join(); netManager.join(); } <|file_sep|>current/agent/src/main.cpp #include "controllers/main/MainModule.hpp" #include "network/bsdsocket/Manager.hpp" #include "network/sniffer/SnifferManager.hpp" int main() { tin::controllers::main::ControllerQueue ctrlQueue; tin::network::bsdsocket::ManagerQueue netManagerQueue; tin::controllers::main::MainModule mainCtrl(ctrlQueue, netManagerQueue); tin::network::bsdsocket::Manager networkManager(netManagerQueue, ctrlQueue, 3333); std::cout << "Hello agent!\n"; auto mainCtrlThread = mainCtrl.createThread(); auto netManager = networkManager.createThread(); try { mainCtrlThread.join(); netManager.join(); <|file_sep|>updated/agent/src/main.cpp
#include "network/bsdsocket/Manager.hpp" #include "network/sniffer/SnifferManager.hpp" int main() { tin::controllers::main::ControllerQueue ctrlQueue; tin::network::bsdsocket::ManagerQueue netManagerQueue; tin::controllers::main::MainModule mainCtrl(ctrlQueue, netManagerQueue); tin::network::bsdsocket::Manager networkManager(netManagerQueue, ctrlQueue, 3333); tin::network::sniffer::SnifferManager sniffManager(ctrlQueue, "lo", "src 127.0.0.1"); std::cout << "Hello agent!\n"; auto mainCtrlThread = mainCtrl.createThread(); auto netManager = networkManager.createThread(); try { mainCtrlThread.join(); netManager.join();
agent/src/main.cpp
C++
f70bad5dc97d7a4a2873e508887f4ad925d8cb0c
<|file_sep|>agent/src/main.cpp.diff original: updated: #include "network/sniffer/SnifferManager.hpp" <|file_sep|>original/agent/src/main.cpp #include "controllers/main/MainModule.hpp" #include "network/bsdsocket/Manager.hpp" int main() { tin::controllers::main::ControllerQueue ctrlQueue; tin::network::bsdsocket::ManagerQueue netManagerQueue; tin::controllers::main::MainModule mainCtrl(ctrlQueue, netManagerQueue); tin::network::bsdsocket::Manager networkManager(netManagerQueue, ctrlQueue, 3333); std::cout << "Hello agent!\n"; auto mainCtrlThread = mainCtrl.createThread(); auto netManager = networkManager.createThread(); try { mainCtrlThread.join(); netManager.join(); } <|file_sep|>current/agent/src/main.cpp #include "controllers/main/MainModule.hpp" #include "network/bsdsocket/Manager.hpp" #include "network/sniffer/SnifferManager.hpp" int main() { tin::controllers::main::ControllerQueue ctrlQueue; tin::network::bsdsocket::ManagerQueue netManagerQueue; tin::controllers::main::MainModule mainCtrl(ctrlQueue, netManagerQueue); tin::network::bsdsocket::Manager networkManager(netManagerQueue, ctrlQueue, 3333); std::cout << "Hello agent!\n"; auto mainCtrlThread = mainCtrl.createThread(); auto netManager = networkManager.createThread(); try { mainCtrlThread.join(); netManager.join(); <|file_sep|>updated/agent/src/main.cpp #include "network/bsdsocket/Manager.hpp" #include "network/sniffer/SnifferManager.hpp" int main() { tin::controllers::main::ControllerQueue ctrlQueue; tin::network::bsdsocket::ManagerQueue netManagerQueue; tin::controllers::main::MainModule mainCtrl(ctrlQueue, netManagerQueue); tin::network::bsdsocket::Manager networkManager(netManagerQueue, ctrlQueue, 3333); tin::network::sniffer::SnifferManager sniffManager(ctrlQueue, "lo", "src 127.0.0.1"); std::cout << "Hello agent!\n"; auto mainCtrlThread = mainCtrl.createThread(); auto netManager = networkManager.createThread(); try { mainCtrlThread.join(); netManager.join();
<|file_sep|>core/main.cpp.diff original: updated: #include <memory/page.h> <|file_sep|>original/core/main.cpp /// @author Kuba Sejdak /// @date 17.07.2016 /// /// @copyright This file is a part of cosmos OS. All rights reserved. /// //////////////////////////////////////////////////////////////////////////////////////////////// #include <memory/allocator.h> #include <memory/regions.h> using namespace Memory; int main() { IAllocator::init(); MemoryRegions& regions = MemoryRegions::instance(); regions.count(); return 0; } <|file_sep|>current/core/main.cpp /// /// @copyright This file is a part of cosmos OS. All rights reserved. /// //////////////////////////////////////////////////////////////////////////////////////////////// #include <memory/allocator.h> #include <memory/regions.h> #include <memory/page.h> using namespace Memory; int main() { IAllocator::init(); MemoryRegions& regions = MemoryRegions::instance(); regions.count(); return 0; } <|file_sep|>updated/core/main.cpp
//////////////////////////////////////////////////////////////////////////////////////////////// #include <memory/allocator.h> #include <memory/regions.h> #include <memory/page.h> using namespace Memory; int main() { IAllocator::init(); MemoryRegions& regions = MemoryRegions::instance(); regions.count(); Page* page = new Page(); delete page; return 0; }
core/main.cpp
C++
60d93b3d0632c467b1df55a50e33e5e46a2ef0bc
<|file_sep|>core/main.cpp.diff original: updated: #include <memory/page.h> <|file_sep|>original/core/main.cpp /// @author Kuba Sejdak /// @date 17.07.2016 /// /// @copyright This file is a part of cosmos OS. All rights reserved. /// //////////////////////////////////////////////////////////////////////////////////////////////// #include <memory/allocator.h> #include <memory/regions.h> using namespace Memory; int main() { IAllocator::init(); MemoryRegions& regions = MemoryRegions::instance(); regions.count(); return 0; } <|file_sep|>current/core/main.cpp /// /// @copyright This file is a part of cosmos OS. All rights reserved. /// //////////////////////////////////////////////////////////////////////////////////////////////// #include <memory/allocator.h> #include <memory/regions.h> #include <memory/page.h> using namespace Memory; int main() { IAllocator::init(); MemoryRegions& regions = MemoryRegions::instance(); regions.count(); return 0; } <|file_sep|>updated/core/main.cpp //////////////////////////////////////////////////////////////////////////////////////////////// #include <memory/allocator.h> #include <memory/regions.h> #include <memory/page.h> using namespace Memory; int main() { IAllocator::init(); MemoryRegions& regions = MemoryRegions::instance(); regions.count(); Page* page = new Page(); delete page; return 0; }
<|file_sep|>bullet_cpp/src/btBoost/btBoostWrapper.cpp.diff original: updated: #include <btBoost/btBoostHello.hpp> <|file_sep|>original/bullet_cpp/src/btBoost/btBoostWrapper.cpp // File: btBoostWrapper.cpp #ifndef _btBoostWrapper_cpp #define _btBoostWrapper_cpp #pragma GCC diagnostic ignored "-Wunused-variable" #pragma GCC diagnostic ignored "-Wreorder" #include <boost/python.hpp> #include <btBoost/btBoostLinearMath.hpp> #include <btBoost/btBoostDynamics.hpp> using namespace boost::python; BOOST_PYTHON_MODULE(bullet) { defineLinearMath(); defineDynamics(); } #endif // _btBoostWrapper_cpp <|file_sep|>current/bullet_cpp/src/btBoost/btBoostWrapper.cpp // File: btBoostWrapper.cpp #ifndef _btBoostWrapper_cpp #define _btBoostWrapper_cpp #pragma GCC diagnostic ignored "-Wunused-variable" #pragma GCC diagnostic ignored "-Wreorder" #include <boost/python.hpp> #include <btBoost/btBoostLinearMath.hpp> #include <btBoost/btBoostDynamics.hpp> #include <btBoost/btBoostHello.hpp> using namespace boost::python; BOOST_PYTHON_MODULE(bullet) { defineLinearMath(); defineDynamics(); } #endif // _btBoostWrapper_cpp <|file_sep|>updated/bullet_cpp/src/btBoost/btBoostWrapper.cpp
#ifndef _btBoostWrapper_cpp #define _btBoostWrapper_cpp #pragma GCC diagnostic ignored "-Wunused-variable" #pragma GCC diagnostic ignored "-Wreorder" #include <boost/python.hpp> #include <btBoost/btBoostLinearMath.hpp> #include <btBoost/btBoostDynamics.hpp> #include <btBoost/btBoostHello.hpp> using namespace boost::python; BOOST_PYTHON_MODULE(bullet) { defineHello(); defineLinearMath(); defineDynamics(); } #endif // _btBoostWrapper_cpp
bullet_cpp/src/btBoost/btBoostWrapper.cpp
C++
bbe9665ee0c9eeef027945c5d1751cc47cfcecaf
<|file_sep|>bullet_cpp/src/btBoost/btBoostWrapper.cpp.diff original: updated: #include <btBoost/btBoostHello.hpp> <|file_sep|>original/bullet_cpp/src/btBoost/btBoostWrapper.cpp // File: btBoostWrapper.cpp #ifndef _btBoostWrapper_cpp #define _btBoostWrapper_cpp #pragma GCC diagnostic ignored "-Wunused-variable" #pragma GCC diagnostic ignored "-Wreorder" #include <boost/python.hpp> #include <btBoost/btBoostLinearMath.hpp> #include <btBoost/btBoostDynamics.hpp> using namespace boost::python; BOOST_PYTHON_MODULE(bullet) { defineLinearMath(); defineDynamics(); } #endif // _btBoostWrapper_cpp <|file_sep|>current/bullet_cpp/src/btBoost/btBoostWrapper.cpp // File: btBoostWrapper.cpp #ifndef _btBoostWrapper_cpp #define _btBoostWrapper_cpp #pragma GCC diagnostic ignored "-Wunused-variable" #pragma GCC diagnostic ignored "-Wreorder" #include <boost/python.hpp> #include <btBoost/btBoostLinearMath.hpp> #include <btBoost/btBoostDynamics.hpp> #include <btBoost/btBoostHello.hpp> using namespace boost::python; BOOST_PYTHON_MODULE(bullet) { defineLinearMath(); defineDynamics(); } #endif // _btBoostWrapper_cpp <|file_sep|>updated/bullet_cpp/src/btBoost/btBoostWrapper.cpp #ifndef _btBoostWrapper_cpp #define _btBoostWrapper_cpp #pragma GCC diagnostic ignored "-Wunused-variable" #pragma GCC diagnostic ignored "-Wreorder" #include <boost/python.hpp> #include <btBoost/btBoostLinearMath.hpp> #include <btBoost/btBoostDynamics.hpp> #include <btBoost/btBoostHello.hpp> using namespace boost::python; BOOST_PYTHON_MODULE(bullet) { defineHello(); defineLinearMath(); defineDynamics(); } #endif // _btBoostWrapper_cpp
<|file_sep|>test/matcherexception.cpp.diff original: updated: #include <cstring> <|file_sep|>test/matcherexception.cpp.diff original: updated: REQUIRE_FALSE(strlen(e.what()) == 0); <|file_sep|>original/test/matcherexception.cpp } TEST_CASE("Can be constructed from Rust error returned over FFI", "[MatcherException]") { SECTION("Attribute unavailable") { const auto e = MatcherException::from_rust_error( rs_get_test_attr_unavail_error()); REQUIRE(e.type() == MatcherException::Type::ATTRIB_UNAVAIL); REQUIRE(e.info() == "test_attribute"); REQUIRE(e.info2().empty()); } SECTION("Invalid regex") { const auto e = MatcherException::from_rust_error( rs_get_test_invalid_regex_error()); REQUIRE(e.type() == MatcherException::Type::INVALID_REGEX); REQUIRE(e.info() == "?!"); REQUIRE(e.info2() == "inconceivable happened!"); } } <|file_sep|>current/test/matcherexception.cpp TEST_CASE("Can be constructed from Rust error returned over FFI", "[MatcherException]") { SECTION("Attribute unavailable") { const auto e = MatcherException::from_rust_error( rs_get_test_attr_unavail_error()); REQUIRE(e.type() == MatcherException::Type::ATTRIB_UNAVAIL); REQUIRE(e.info() == "test_attribute"); REQUIRE(e.info2().empty()); REQUIRE_FALSE(strlen(e.what()) == 0); } SECTION("Invalid regex") { const auto e = MatcherException::from_rust_error( rs_get_test_invalid_regex_error()); REQUIRE(e.type() == MatcherException::Type::INVALID_REGEX); REQUIRE(e.info() == "?!"); REQUIRE(e.info2() == "inconceivable happened!"); } } <|file_sep|>updated/test/matcherexception.cpp
TEST_CASE("Can be constructed from Rust error returned over FFI", "[MatcherException]") { SECTION("Attribute unavailable") { const auto e = MatcherException::from_rust_error( rs_get_test_attr_unavail_error()); REQUIRE(e.type() == MatcherException::Type::ATTRIB_UNAVAIL); REQUIRE(e.info() == "test_attribute"); REQUIRE(e.info2().empty()); REQUIRE_FALSE(strlen(e.what()) == 0); } SECTION("Invalid regex") { const auto e = MatcherException::from_rust_error( rs_get_test_invalid_regex_error()); REQUIRE(e.type() == MatcherException::Type::INVALID_REGEX); REQUIRE(e.info() == "?!"); REQUIRE(e.info2() == "inconceivable happened!"); REQUIRE_FALSE(strlen(e.what()) == 0); } }
test/matcherexception.cpp
C++
e6a00522a394bec0866381e8241deced4ddb6191
<|file_sep|>test/matcherexception.cpp.diff original: updated: #include <cstring> <|file_sep|>test/matcherexception.cpp.diff original: updated: REQUIRE_FALSE(strlen(e.what()) == 0); <|file_sep|>original/test/matcherexception.cpp } TEST_CASE("Can be constructed from Rust error returned over FFI", "[MatcherException]") { SECTION("Attribute unavailable") { const auto e = MatcherException::from_rust_error( rs_get_test_attr_unavail_error()); REQUIRE(e.type() == MatcherException::Type::ATTRIB_UNAVAIL); REQUIRE(e.info() == "test_attribute"); REQUIRE(e.info2().empty()); } SECTION("Invalid regex") { const auto e = MatcherException::from_rust_error( rs_get_test_invalid_regex_error()); REQUIRE(e.type() == MatcherException::Type::INVALID_REGEX); REQUIRE(e.info() == "?!"); REQUIRE(e.info2() == "inconceivable happened!"); } } <|file_sep|>current/test/matcherexception.cpp TEST_CASE("Can be constructed from Rust error returned over FFI", "[MatcherException]") { SECTION("Attribute unavailable") { const auto e = MatcherException::from_rust_error( rs_get_test_attr_unavail_error()); REQUIRE(e.type() == MatcherException::Type::ATTRIB_UNAVAIL); REQUIRE(e.info() == "test_attribute"); REQUIRE(e.info2().empty()); REQUIRE_FALSE(strlen(e.what()) == 0); } SECTION("Invalid regex") { const auto e = MatcherException::from_rust_error( rs_get_test_invalid_regex_error()); REQUIRE(e.type() == MatcherException::Type::INVALID_REGEX); REQUIRE(e.info() == "?!"); REQUIRE(e.info2() == "inconceivable happened!"); } } <|file_sep|>updated/test/matcherexception.cpp TEST_CASE("Can be constructed from Rust error returned over FFI", "[MatcherException]") { SECTION("Attribute unavailable") { const auto e = MatcherException::from_rust_error( rs_get_test_attr_unavail_error()); REQUIRE(e.type() == MatcherException::Type::ATTRIB_UNAVAIL); REQUIRE(e.info() == "test_attribute"); REQUIRE(e.info2().empty()); REQUIRE_FALSE(strlen(e.what()) == 0); } SECTION("Invalid regex") { const auto e = MatcherException::from_rust_error( rs_get_test_invalid_regex_error()); REQUIRE(e.type() == MatcherException::Type::INVALID_REGEX); REQUIRE(e.info() == "?!"); REQUIRE(e.info2() == "inconceivable happened!"); REQUIRE_FALSE(strlen(e.what()) == 0); } }
<|file_sep|>ReactCommon/fabric/components/root/RootShadowNode.cpp.diff original: updated: #include <react/debug/SystraceSection.h> <|file_sep|>original/ReactCommon/fabric/components/root/RootShadowNode.cpp #include "RootShadowNode.h" #include <react/components/view/conversions.h> namespace facebook { namespace react { const char RootComponentName[] = "RootView"; void RootShadowNode::layout() { ensureUnsealed(); layout(getProps()->layoutContext); // This is the rare place where shadow node must layout (set `layoutMetrics`) // itself because there is no a parent node which usually should do it. setLayoutMetrics(layoutMetricsFromYogaNode(yogaNode_)); } } // namespace react } // namespace facebook <|file_sep|>current/ReactCommon/fabric/components/root/RootShadowNode.cpp #include "RootShadowNode.h" #include <react/components/view/conversions.h> #include <react/debug/SystraceSection.h> namespace facebook { namespace react { const char RootComponentName[] = "RootView"; void RootShadowNode::layout() { ensureUnsealed(); layout(getProps()->layoutContext); // This is the rare place where shadow node must layout (set `layoutMetrics`) // itself because there is no a parent node which usually should do it. setLayoutMetrics(layoutMetricsFromYogaNode(yogaNode_)); } } // namespace react } // namespace facebook <|file_sep|>updated/ReactCommon/fabric/components/root/RootShadowNode.cpp
#include <react/components/view/conversions.h> #include <react/debug/SystraceSection.h> namespace facebook { namespace react { const char RootComponentName[] = "RootView"; void RootShadowNode::layout() { SystraceSection s("RootShadowNode::layout"); ensureUnsealed(); layout(getProps()->layoutContext); // This is the rare place where shadow node must layout (set `layoutMetrics`) // itself because there is no a parent node which usually should do it. setLayoutMetrics(layoutMetricsFromYogaNode(yogaNode_)); } } // namespace react } // namespace facebook
ReactCommon/fabric/components/root/RootShadowNode.cpp
C++
3b4d6d5ef58bd6c66306152c5f62d9e09ebe1216
<|file_sep|>ReactCommon/fabric/components/root/RootShadowNode.cpp.diff original: updated: #include <react/debug/SystraceSection.h> <|file_sep|>original/ReactCommon/fabric/components/root/RootShadowNode.cpp #include "RootShadowNode.h" #include <react/components/view/conversions.h> namespace facebook { namespace react { const char RootComponentName[] = "RootView"; void RootShadowNode::layout() { ensureUnsealed(); layout(getProps()->layoutContext); // This is the rare place where shadow node must layout (set `layoutMetrics`) // itself because there is no a parent node which usually should do it. setLayoutMetrics(layoutMetricsFromYogaNode(yogaNode_)); } } // namespace react } // namespace facebook <|file_sep|>current/ReactCommon/fabric/components/root/RootShadowNode.cpp #include "RootShadowNode.h" #include <react/components/view/conversions.h> #include <react/debug/SystraceSection.h> namespace facebook { namespace react { const char RootComponentName[] = "RootView"; void RootShadowNode::layout() { ensureUnsealed(); layout(getProps()->layoutContext); // This is the rare place where shadow node must layout (set `layoutMetrics`) // itself because there is no a parent node which usually should do it. setLayoutMetrics(layoutMetricsFromYogaNode(yogaNode_)); } } // namespace react } // namespace facebook <|file_sep|>updated/ReactCommon/fabric/components/root/RootShadowNode.cpp #include <react/components/view/conversions.h> #include <react/debug/SystraceSection.h> namespace facebook { namespace react { const char RootComponentName[] = "RootView"; void RootShadowNode::layout() { SystraceSection s("RootShadowNode::layout"); ensureUnsealed(); layout(getProps()->layoutContext); // This is the rare place where shadow node must layout (set `layoutMetrics`) // itself because there is no a parent node which usually should do it. setLayoutMetrics(layoutMetricsFromYogaNode(yogaNode_)); } } // namespace react } // namespace facebook
<|file_sep|>test/SemaTemplate/default-expr-arguments.cpp.diff original: updated: struct FD : F<int> { }; <|file_sep|>original/test/SemaTemplate/default-expr-arguments.cpp f2(S()); f3(10); f3(S()); // expected-note{{in instantiation of default argument for 'f3<struct S>' required here}} } template<typename T> struct F { F(T t = 10); }; void g2() { F<int> f; } template<typename T> struct G { G(T) {} }; void s(G<int> flags = 10) { } <|file_sep|>current/test/SemaTemplate/default-expr-arguments.cpp f3(10); f3(S()); // expected-note{{in instantiation of default argument for 'f3<struct S>' required here}} } template<typename T> struct F { F(T t = 10); }; struct FD : F<int> { }; void g2() { F<int> f; } template<typename T> struct G { G(T) {} }; void s(G<int> flags = 10) { } <|file_sep|>updated/test/SemaTemplate/default-expr-arguments.cpp
f3(S()); // expected-note{{in instantiation of default argument for 'f3<struct S>' required here}} } template<typename T> struct F { F(T t = 10); }; struct FD : F<int> { }; void g2() { F<int> f; FD fd; } template<typename T> struct G { G(T) {} }; void s(G<int> flags = 10) { }
test/SemaTemplate/default-expr-arguments.cpp
C++
0b84a53412a6acac38e2d647d220ce7af851395e
<|file_sep|>test/SemaTemplate/default-expr-arguments.cpp.diff original: updated: struct FD : F<int> { }; <|file_sep|>original/test/SemaTemplate/default-expr-arguments.cpp f2(S()); f3(10); f3(S()); // expected-note{{in instantiation of default argument for 'f3<struct S>' required here}} } template<typename T> struct F { F(T t = 10); }; void g2() { F<int> f; } template<typename T> struct G { G(T) {} }; void s(G<int> flags = 10) { } <|file_sep|>current/test/SemaTemplate/default-expr-arguments.cpp f3(10); f3(S()); // expected-note{{in instantiation of default argument for 'f3<struct S>' required here}} } template<typename T> struct F { F(T t = 10); }; struct FD : F<int> { }; void g2() { F<int> f; } template<typename T> struct G { G(T) {} }; void s(G<int> flags = 10) { } <|file_sep|>updated/test/SemaTemplate/default-expr-arguments.cpp f3(S()); // expected-note{{in instantiation of default argument for 'f3<struct S>' required here}} } template<typename T> struct F { F(T t = 10); }; struct FD : F<int> { }; void g2() { F<int> f; FD fd; } template<typename T> struct G { G(T) {} }; void s(G<int> flags = 10) { }
<|file_sep|>src/test/fuzz/fees.cpp.diff original: updated: #include <util/fees.h> <|file_sep|>original/src/test/fuzz/fees.cpp #include <optional.h> #include <policy/fees.h> #include <test/fuzz/FuzzedDataProvider.h> #include <test/fuzz/fuzz.h> #include <test/fuzz/util.h> #include <cstdint> #include <string> #include <vector> void test_one_input(const std::vector<uint8_t>& buffer) { FuzzedDataProvider fuzzed_data_provider(buffer.data(), buffer.size()); const CFeeRate minimal_incremental_fee{ConsumeMoney(fuzzed_data_provider)}; FeeFilterRounder fee_filter_rounder{minimal_incremental_fee}; while (fuzzed_data_provider.ConsumeBool()) { const CAmount current_minimum_fee = ConsumeMoney(fuzzed_data_provider); const CAmount rounded_fee = fee_filter_rounder.round(current_minimum_fee); assert(MoneyRange(rounded_fee)); } } <|file_sep|>current/src/test/fuzz/fees.cpp #include <policy/fees.h> #include <test/fuzz/FuzzedDataProvider.h> #include <test/fuzz/fuzz.h> #include <test/fuzz/util.h> #include <util/fees.h> #include <cstdint> #include <string> #include <vector> void test_one_input(const std::vector<uint8_t>& buffer) { FuzzedDataProvider fuzzed_data_provider(buffer.data(), buffer.size()); const CFeeRate minimal_incremental_fee{ConsumeMoney(fuzzed_data_provider)}; FeeFilterRounder fee_filter_rounder{minimal_incremental_fee}; while (fuzzed_data_provider.ConsumeBool()) { const CAmount current_minimum_fee = ConsumeMoney(fuzzed_data_provider); const CAmount rounded_fee = fee_filter_rounder.round(current_minimum_fee); assert(MoneyRange(rounded_fee)); } } <|file_sep|>updated/src/test/fuzz/fees.cpp
#include <test/fuzz/fuzz.h> #include <test/fuzz/util.h> #include <util/fees.h> #include <cstdint> #include <string> #include <vector> void test_one_input(const std::vector<uint8_t>& buffer) { FuzzedDataProvider fuzzed_data_provider(buffer.data(), buffer.size()); const CFeeRate minimal_incremental_fee{ConsumeMoney(fuzzed_data_provider)}; FeeFilterRounder fee_filter_rounder{minimal_incremental_fee}; while (fuzzed_data_provider.ConsumeBool()) { const CAmount current_minimum_fee = ConsumeMoney(fuzzed_data_provider); const CAmount rounded_fee = fee_filter_rounder.round(current_minimum_fee); assert(MoneyRange(rounded_fee)); } const FeeReason fee_reason = fuzzed_data_provider.PickValueInArray({FeeReason::NONE, FeeReason::HALF_ESTIMATE, FeeReason::FULL_ESTIMATE, FeeReason::DOUBLE_ESTIMATE, FeeReason::CONSERVATIVE, FeeReason::MEMPOOL_MIN, FeeReason::PAYTXFEE, FeeReason::FALLBACK, FeeReason::REQUIRED}); (void)StringForFeeReason(fee_reason); }
src/test/fuzz/fees.cpp
C++
a4e3d13df6a6f48974f541de0b5b061e8078ba9a
<|file_sep|>src/test/fuzz/fees.cpp.diff original: updated: #include <util/fees.h> <|file_sep|>original/src/test/fuzz/fees.cpp #include <optional.h> #include <policy/fees.h> #include <test/fuzz/FuzzedDataProvider.h> #include <test/fuzz/fuzz.h> #include <test/fuzz/util.h> #include <cstdint> #include <string> #include <vector> void test_one_input(const std::vector<uint8_t>& buffer) { FuzzedDataProvider fuzzed_data_provider(buffer.data(), buffer.size()); const CFeeRate minimal_incremental_fee{ConsumeMoney(fuzzed_data_provider)}; FeeFilterRounder fee_filter_rounder{minimal_incremental_fee}; while (fuzzed_data_provider.ConsumeBool()) { const CAmount current_minimum_fee = ConsumeMoney(fuzzed_data_provider); const CAmount rounded_fee = fee_filter_rounder.round(current_minimum_fee); assert(MoneyRange(rounded_fee)); } } <|file_sep|>current/src/test/fuzz/fees.cpp #include <policy/fees.h> #include <test/fuzz/FuzzedDataProvider.h> #include <test/fuzz/fuzz.h> #include <test/fuzz/util.h> #include <util/fees.h> #include <cstdint> #include <string> #include <vector> void test_one_input(const std::vector<uint8_t>& buffer) { FuzzedDataProvider fuzzed_data_provider(buffer.data(), buffer.size()); const CFeeRate minimal_incremental_fee{ConsumeMoney(fuzzed_data_provider)}; FeeFilterRounder fee_filter_rounder{minimal_incremental_fee}; while (fuzzed_data_provider.ConsumeBool()) { const CAmount current_minimum_fee = ConsumeMoney(fuzzed_data_provider); const CAmount rounded_fee = fee_filter_rounder.round(current_minimum_fee); assert(MoneyRange(rounded_fee)); } } <|file_sep|>updated/src/test/fuzz/fees.cpp #include <test/fuzz/fuzz.h> #include <test/fuzz/util.h> #include <util/fees.h> #include <cstdint> #include <string> #include <vector> void test_one_input(const std::vector<uint8_t>& buffer) { FuzzedDataProvider fuzzed_data_provider(buffer.data(), buffer.size()); const CFeeRate minimal_incremental_fee{ConsumeMoney(fuzzed_data_provider)}; FeeFilterRounder fee_filter_rounder{minimal_incremental_fee}; while (fuzzed_data_provider.ConsumeBool()) { const CAmount current_minimum_fee = ConsumeMoney(fuzzed_data_provider); const CAmount rounded_fee = fee_filter_rounder.round(current_minimum_fee); assert(MoneyRange(rounded_fee)); } const FeeReason fee_reason = fuzzed_data_provider.PickValueInArray({FeeReason::NONE, FeeReason::HALF_ESTIMATE, FeeReason::FULL_ESTIMATE, FeeReason::DOUBLE_ESTIMATE, FeeReason::CONSERVATIVE, FeeReason::MEMPOOL_MIN, FeeReason::PAYTXFEE, FeeReason::FALLBACK, FeeReason::REQUIRED}); (void)StringForFeeReason(fee_reason); }
<|file_sep|>src/platform/posix.cpp.diff original: updated: #include "../collector.hpp" #include <signal.h> <|file_sep|>src/platform/posix.cpp.diff original: updated: void signal_handler(int) { Collector::signal(); } <|file_sep|>original/src/platform/posix.cpp void *allocate_region(size_t bytes) { void *result = mmap(0, bytes, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); mirb_runtime_assert(result != 0); return result; } void free_region(void *region, size_t bytes) { munmap(region, bytes); } void initialize() { } }; }; #endif <|file_sep|>current/src/platform/posix.cpp return result; } void free_region(void *region, size_t bytes) { munmap(region, bytes); } void signal_handler(int) { Collector::signal(); } void initialize() { } }; }; #endif <|file_sep|>updated/src/platform/posix.cpp
return result; } void free_region(void *region, size_t bytes) { munmap(region, bytes); } void signal_handler(int) { Collector::signal(); } void initialize() { signal(SIGINT, signal_handler); } }; }; #endif
src/platform/posix.cpp
C++
9a287fd661bcd7ade1753a5fb8b171408fb9ec08
<|file_sep|>src/platform/posix.cpp.diff original: updated: #include "../collector.hpp" #include <signal.h> <|file_sep|>src/platform/posix.cpp.diff original: updated: void signal_handler(int) { Collector::signal(); } <|file_sep|>original/src/platform/posix.cpp void *allocate_region(size_t bytes) { void *result = mmap(0, bytes, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); mirb_runtime_assert(result != 0); return result; } void free_region(void *region, size_t bytes) { munmap(region, bytes); } void initialize() { } }; }; #endif <|file_sep|>current/src/platform/posix.cpp return result; } void free_region(void *region, size_t bytes) { munmap(region, bytes); } void signal_handler(int) { Collector::signal(); } void initialize() { } }; }; #endif <|file_sep|>updated/src/platform/posix.cpp return result; } void free_region(void *region, size_t bytes) { munmap(region, bytes); } void signal_handler(int) { Collector::signal(); } void initialize() { signal(SIGINT, signal_handler); } }; }; #endif
<|file_sep|>src/main.cpp.diff original: updated: #include <QDebug> <|file_sep|>original/src/main.cpp #include <QStateMachine> #include <memory> #include "./window.h" #include "./demo_scene.h" #include "./input/invoke_manager.h" #include "./input/signal_manager.h" #include "./input/scxml_importer.h" int main(int argc, char **argv) { QGuiApplication application(argc, argv); auto invokeManager = std::shared_ptr<InvokeManager>(new InvokeManager()); auto scene = std::make_shared<DemoScene>(invokeManager); Window window(scene); window.rootContext()->setContextProperty("window", &window); window.setSource(QUrl("qrc:ui.qml")); auto signalManager = std::shared_ptr<SignalManager>(new SignalManager()); ScxmlImporter importer(QUrl::fromLocalFile("../config/states.xml"), invokeManager, signalManager); <|file_sep|>current/src/main.cpp #include <QStateMachine> #include <QDebug> #include <memory> #include "./window.h" #include "./demo_scene.h" #include "./input/invoke_manager.h" #include "./input/signal_manager.h" #include "./input/scxml_importer.h" int main(int argc, char **argv) { QGuiApplication application(argc, argv); auto invokeManager = std::shared_ptr<InvokeManager>(new InvokeManager()); auto scene = std::make_shared<DemoScene>(invokeManager); Window window(scene); window.rootContext()->setContextProperty("window", &window); window.setSource(QUrl("qrc:ui.qml")); auto signalManager = std::shared_ptr<SignalManager>(new SignalManager()); ScxmlImporter importer(QUrl::fromLocalFile("../config/states.xml"), <|file_sep|>updated/src/main.cpp
#include <memory> #include "./window.h" #include "./demo_scene.h" #include "./input/invoke_manager.h" #include "./input/signal_manager.h" #include "./input/scxml_importer.h" int main(int argc, char **argv) { qputenv("QT_MESSAGE_PATTERN", QString("%{time [yyyy'-'MM'-'dd' 'hh':'mm':'ss]} - %{threadid} " "%{if-category}%{category}: %{endif}%{message}").toUtf8()); QGuiApplication application(argc, argv); auto invokeManager = std::shared_ptr<InvokeManager>(new InvokeManager()); auto scene = std::make_shared<DemoScene>(invokeManager); Window window(scene); window.rootContext()->setContextProperty("window", &window); window.setSource(QUrl("qrc:ui.qml")); auto signalManager = std::shared_ptr<SignalManager>(new SignalManager());
src/main.cpp
C++
93f9fa12954a5167090dbc3bce572c0a56d2870e
<|file_sep|>src/main.cpp.diff original: updated: #include <QDebug> <|file_sep|>original/src/main.cpp #include <QStateMachine> #include <memory> #include "./window.h" #include "./demo_scene.h" #include "./input/invoke_manager.h" #include "./input/signal_manager.h" #include "./input/scxml_importer.h" int main(int argc, char **argv) { QGuiApplication application(argc, argv); auto invokeManager = std::shared_ptr<InvokeManager>(new InvokeManager()); auto scene = std::make_shared<DemoScene>(invokeManager); Window window(scene); window.rootContext()->setContextProperty("window", &window); window.setSource(QUrl("qrc:ui.qml")); auto signalManager = std::shared_ptr<SignalManager>(new SignalManager()); ScxmlImporter importer(QUrl::fromLocalFile("../config/states.xml"), invokeManager, signalManager); <|file_sep|>current/src/main.cpp #include <QStateMachine> #include <QDebug> #include <memory> #include "./window.h" #include "./demo_scene.h" #include "./input/invoke_manager.h" #include "./input/signal_manager.h" #include "./input/scxml_importer.h" int main(int argc, char **argv) { QGuiApplication application(argc, argv); auto invokeManager = std::shared_ptr<InvokeManager>(new InvokeManager()); auto scene = std::make_shared<DemoScene>(invokeManager); Window window(scene); window.rootContext()->setContextProperty("window", &window); window.setSource(QUrl("qrc:ui.qml")); auto signalManager = std::shared_ptr<SignalManager>(new SignalManager()); ScxmlImporter importer(QUrl::fromLocalFile("../config/states.xml"), <|file_sep|>updated/src/main.cpp #include <memory> #include "./window.h" #include "./demo_scene.h" #include "./input/invoke_manager.h" #include "./input/signal_manager.h" #include "./input/scxml_importer.h" int main(int argc, char **argv) { qputenv("QT_MESSAGE_PATTERN", QString("%{time [yyyy'-'MM'-'dd' 'hh':'mm':'ss]} - %{threadid} " "%{if-category}%{category}: %{endif}%{message}").toUtf8()); QGuiApplication application(argc, argv); auto invokeManager = std::shared_ptr<InvokeManager>(new InvokeManager()); auto scene = std::make_shared<DemoScene>(invokeManager); Window window(scene); window.rootContext()->setContextProperty("window", &window); window.setSource(QUrl("qrc:ui.qml")); auto signalManager = std::shared_ptr<SignalManager>(new SignalManager());
<|file_sep|>crypto/ec_signature_creator.cc.diff original: updated: #include "base/logging.h" <|file_sep|>original/crypto/ec_signature_creator.cc namespace { ECSignatureCreatorFactory* g_factory_ = NULL; } // namespace // static ECSignatureCreator* ECSignatureCreator::Create(ECPrivateKey* key) { if (g_factory_) return g_factory_->Create(key); return new ECSignatureCreatorImpl(key); } // static void ECSignatureCreator::SetFactoryForTesting( ECSignatureCreatorFactory* factory) { g_factory_ = factory; } } // namespace crypto <|file_sep|>current/crypto/ec_signature_creator.cc namespace { ECSignatureCreatorFactory* g_factory_ = NULL; } // namespace // static ECSignatureCreator* ECSignatureCreator::Create(ECPrivateKey* key) { if (g_factory_) return g_factory_->Create(key); return new ECSignatureCreatorImpl(key); } // static void ECSignatureCreator::SetFactoryForTesting( ECSignatureCreatorFactory* factory) { g_factory_ = factory; } } // namespace crypto <|file_sep|>updated/crypto/ec_signature_creator.cc
ECSignatureCreatorFactory* g_factory_ = NULL; } // namespace // static ECSignatureCreator* ECSignatureCreator::Create(ECPrivateKey* key) { if (g_factory_) return g_factory_->Create(key); return new ECSignatureCreatorImpl(key); } // static void ECSignatureCreator::SetFactoryForTesting( ECSignatureCreatorFactory* factory) { // We should always clear the factory after each test to avoid // use-after-free problems. DCHECK(!g_factory_ || !factory); g_factory_ = factory; } } // namespace crypto
crypto/ec_signature_creator.cc
C++
34b1289eb33a88631bbf8dc61febfe31ef3a9235
<|file_sep|>crypto/ec_signature_creator.cc.diff original: updated: #include "base/logging.h" <|file_sep|>original/crypto/ec_signature_creator.cc namespace { ECSignatureCreatorFactory* g_factory_ = NULL; } // namespace // static ECSignatureCreator* ECSignatureCreator::Create(ECPrivateKey* key) { if (g_factory_) return g_factory_->Create(key); return new ECSignatureCreatorImpl(key); } // static void ECSignatureCreator::SetFactoryForTesting( ECSignatureCreatorFactory* factory) { g_factory_ = factory; } } // namespace crypto <|file_sep|>current/crypto/ec_signature_creator.cc namespace { ECSignatureCreatorFactory* g_factory_ = NULL; } // namespace // static ECSignatureCreator* ECSignatureCreator::Create(ECPrivateKey* key) { if (g_factory_) return g_factory_->Create(key); return new ECSignatureCreatorImpl(key); } // static void ECSignatureCreator::SetFactoryForTesting( ECSignatureCreatorFactory* factory) { g_factory_ = factory; } } // namespace crypto <|file_sep|>updated/crypto/ec_signature_creator.cc ECSignatureCreatorFactory* g_factory_ = NULL; } // namespace // static ECSignatureCreator* ECSignatureCreator::Create(ECPrivateKey* key) { if (g_factory_) return g_factory_->Create(key); return new ECSignatureCreatorImpl(key); } // static void ECSignatureCreator::SetFactoryForTesting( ECSignatureCreatorFactory* factory) { // We should always clear the factory after each test to avoid // use-after-free problems. DCHECK(!g_factory_ || !factory); g_factory_ = factory; } } // namespace crypto
<|file_sep|>src/U8Gettext.cpp.diff original: updated: static const U8GettextLanguage * sLanguageInstance = NULL; <|file_sep|>original/src/U8Gettext.cpp static const char * sU8GettextLanguage = "en_US"; const char *U8GettextSetLanguage(const char *language) { const char * oldLanguage = sU8GettextLanguage; sU8GettextLanguage = language; return oldLanguage; } const char *U8GettextGetLanguage() { return sU8GettextLanguage; } const char *U8Gettext(const char *str) { // TODO Implementation } <|file_sep|>current/src/U8Gettext.cpp static const U8GettextLanguage * sLanguageInstance = NULL; const char *U8GettextSetLanguage(const char *language) { const char * oldLanguage = sU8GettextLanguage; sU8GettextLanguage = language; return oldLanguage; } const char *U8GettextGetLanguage() { return sU8GettextLanguage; } const char *U8Gettext(const char *str) { // TODO Implementation } <|file_sep|>updated/src/U8Gettext.cpp
const char *U8GettextSetLanguage(const char *language) { const char * oldLanguage = sU8GettextLanguage; sU8GettextLanguage = language; return oldLanguage; } const char *U8GettextGetLanguage() { return sU8GettextLanguage; } const char *U8Gettext(const char *str) { // TODO Implementation if (!sLanguageInstance) { return str; } }
src/U8Gettext.cpp
C++
ecc62ddac66239335cf8a8d7833c6d7ce64b7ec6
<|file_sep|>src/U8Gettext.cpp.diff original: updated: static const U8GettextLanguage * sLanguageInstance = NULL; <|file_sep|>original/src/U8Gettext.cpp static const char * sU8GettextLanguage = "en_US"; const char *U8GettextSetLanguage(const char *language) { const char * oldLanguage = sU8GettextLanguage; sU8GettextLanguage = language; return oldLanguage; } const char *U8GettextGetLanguage() { return sU8GettextLanguage; } const char *U8Gettext(const char *str) { // TODO Implementation } <|file_sep|>current/src/U8Gettext.cpp static const U8GettextLanguage * sLanguageInstance = NULL; const char *U8GettextSetLanguage(const char *language) { const char * oldLanguage = sU8GettextLanguage; sU8GettextLanguage = language; return oldLanguage; } const char *U8GettextGetLanguage() { return sU8GettextLanguage; } const char *U8Gettext(const char *str) { // TODO Implementation } <|file_sep|>updated/src/U8Gettext.cpp const char *U8GettextSetLanguage(const char *language) { const char * oldLanguage = sU8GettextLanguage; sU8GettextLanguage = language; return oldLanguage; } const char *U8GettextGetLanguage() { return sU8GettextLanguage; } const char *U8Gettext(const char *str) { // TODO Implementation if (!sLanguageInstance) { return str; } }
<|file_sep|>src/common/utils.cc.diff original: updated: #ifdef PISTACHE_USE_SSL <|file_sep|>original/src/common/utils.cc size_t to_read; if (in == -1) return -1; to_read = sizeof(buffer) > count ? count : sizeof(buffer); if (offset != NULL) ret = pread(in, buffer, to_read, *offset); else ret = read(in, buffer, to_read); if (ret == -1) return -1; written = SSL_write(out, buffer, ret); if (offset != NULL) *offset += written; return written; } <|file_sep|>current/src/common/utils.cc size_t to_read; if (in == -1) return -1; to_read = sizeof(buffer) > count ? count : sizeof(buffer); if (offset != NULL) ret = pread(in, buffer, to_read, *offset); else ret = read(in, buffer, to_read); if (ret == -1) return -1; written = SSL_write(out, buffer, ret); if (offset != NULL) *offset += written; return written; } <|file_sep|>updated/src/common/utils.cc
if (in == -1) return -1; to_read = sizeof(buffer) > count ? count : sizeof(buffer); if (offset != NULL) ret = pread(in, buffer, to_read, *offset); else ret = read(in, buffer, to_read); if (ret == -1) return -1; written = SSL_write(out, buffer, ret); if (offset != NULL) *offset += written; return written; } #endif /* PISTACHE_USE_SSL */
src/common/utils.cc
C++
27eda3a7860e6c0835543c6fcb358d3ff90a79ad
<|file_sep|>src/common/utils.cc.diff original: updated: #ifdef PISTACHE_USE_SSL <|file_sep|>original/src/common/utils.cc size_t to_read; if (in == -1) return -1; to_read = sizeof(buffer) > count ? count : sizeof(buffer); if (offset != NULL) ret = pread(in, buffer, to_read, *offset); else ret = read(in, buffer, to_read); if (ret == -1) return -1; written = SSL_write(out, buffer, ret); if (offset != NULL) *offset += written; return written; } <|file_sep|>current/src/common/utils.cc size_t to_read; if (in == -1) return -1; to_read = sizeof(buffer) > count ? count : sizeof(buffer); if (offset != NULL) ret = pread(in, buffer, to_read, *offset); else ret = read(in, buffer, to_read); if (ret == -1) return -1; written = SSL_write(out, buffer, ret); if (offset != NULL) *offset += written; return written; } <|file_sep|>updated/src/common/utils.cc if (in == -1) return -1; to_read = sizeof(buffer) > count ? count : sizeof(buffer); if (offset != NULL) ret = pread(in, buffer, to_read, *offset); else ret = read(in, buffer, to_read); if (ret == -1) return -1; written = SSL_write(out, buffer, ret); if (offset != NULL) *offset += written; return written; } #endif /* PISTACHE_USE_SSL */
<|file_sep|>src/qca_systemstore_flatfile.cpp.diff original: updated: #ifdef QCA_NO_SYSTEMSTORE return false; #else <|file_sep|>src/qca_systemstore_flatfile.cpp.diff original: updated: #endif <|file_sep|>src/qca_systemstore_flatfile.cpp.diff original: updated: #ifdef QCA_NO_SYSTEMSTORE Q_UNUSED(provider); return CertificateCollection(); #else <|file_sep|>original/src/qca_systemstore_flatfile.cpp * */ #include "qca_systemstore.h" #include <QtCore> namespace QCA { bool qca_have_systemstore() { QFile f(QCA_SYSTEMSTORE_PATH); return f.open(QFile::ReadOnly); } CertificateCollection qca_get_systemstore(const QString &provider) { return CertificateCollection::fromFlatTextFile(QCA_SYSTEMSTORE_PATH, 0, provider); } } <|file_sep|>current/src/qca_systemstore_flatfile.cpp bool qca_have_systemstore() { #ifdef QCA_NO_SYSTEMSTORE return false; #else QFile f(QCA_SYSTEMSTORE_PATH); return f.open(QFile::ReadOnly); #endif } CertificateCollection qca_get_systemstore(const QString &provider) { #ifdef QCA_NO_SYSTEMSTORE Q_UNUSED(provider); return CertificateCollection(); #else return CertificateCollection::fromFlatTextFile(QCA_SYSTEMSTORE_PATH, 0, provider); } } <|file_sep|>updated/src/qca_systemstore_flatfile.cpp
bool qca_have_systemstore() { #ifdef QCA_NO_SYSTEMSTORE return false; #else QFile f(QCA_SYSTEMSTORE_PATH); return f.open(QFile::ReadOnly); #endif } CertificateCollection qca_get_systemstore(const QString &provider) { #ifdef QCA_NO_SYSTEMSTORE Q_UNUSED(provider); return CertificateCollection(); #else return CertificateCollection::fromFlatTextFile(QCA_SYSTEMSTORE_PATH, 0, provider); #endif } }
src/qca_systemstore_flatfile.cpp
C++
478eac7446d56a297405de4ab1b14da8d8e21494
<|file_sep|>src/qca_systemstore_flatfile.cpp.diff original: updated: #ifdef QCA_NO_SYSTEMSTORE return false; #else <|file_sep|>src/qca_systemstore_flatfile.cpp.diff original: updated: #endif <|file_sep|>src/qca_systemstore_flatfile.cpp.diff original: updated: #ifdef QCA_NO_SYSTEMSTORE Q_UNUSED(provider); return CertificateCollection(); #else <|file_sep|>original/src/qca_systemstore_flatfile.cpp * */ #include "qca_systemstore.h" #include <QtCore> namespace QCA { bool qca_have_systemstore() { QFile f(QCA_SYSTEMSTORE_PATH); return f.open(QFile::ReadOnly); } CertificateCollection qca_get_systemstore(const QString &provider) { return CertificateCollection::fromFlatTextFile(QCA_SYSTEMSTORE_PATH, 0, provider); } } <|file_sep|>current/src/qca_systemstore_flatfile.cpp bool qca_have_systemstore() { #ifdef QCA_NO_SYSTEMSTORE return false; #else QFile f(QCA_SYSTEMSTORE_PATH); return f.open(QFile::ReadOnly); #endif } CertificateCollection qca_get_systemstore(const QString &provider) { #ifdef QCA_NO_SYSTEMSTORE Q_UNUSED(provider); return CertificateCollection(); #else return CertificateCollection::fromFlatTextFile(QCA_SYSTEMSTORE_PATH, 0, provider); } } <|file_sep|>updated/src/qca_systemstore_flatfile.cpp bool qca_have_systemstore() { #ifdef QCA_NO_SYSTEMSTORE return false; #else QFile f(QCA_SYSTEMSTORE_PATH); return f.open(QFile::ReadOnly); #endif } CertificateCollection qca_get_systemstore(const QString &provider) { #ifdef QCA_NO_SYSTEMSTORE Q_UNUSED(provider); return CertificateCollection(); #else return CertificateCollection::fromFlatTextFile(QCA_SYSTEMSTORE_PATH, 0, provider); #endif } }
<|file_sep|>benchmark/src/Main.cpp.diff original: updated: #include <stdexcept> <|file_sep|>original/benchmark/src/Main.cpp using namespace std; int realMain(int argc, char* argv[]); int main(int argc, char* argv[]) { try { return realMain(argc, argv); } catch (...) { cout << "ERROR: Unhandled exception, benchmark terminated\n"; return EXIT_FAILURE; } } int realMain(int argc, char* argv[]) { printHeader(); Parameters parameters = readParameters(argc, argv); printParameters(parameters); <|file_sep|>current/benchmark/src/Main.cpp using namespace pica; using namespace std; int realMain(int argc, char* argv[]); int main(int argc, char* argv[]) { try { return realMain(argc, argv); } catch (...) { cout << "ERROR: Unhandled exception, benchmark terminated\n"; return EXIT_FAILURE; } } int realMain(int argc, char* argv[]) { printHeader(); Parameters parameters = readParameters(argc, argv); <|file_sep|>updated/benchmark/src/Main.cpp
int realMain(int argc, char* argv[]); int main(int argc, char* argv[]) { try { return realMain(argc, argv); } catch (std::exception& e) { cout << "ERROR: Unhandled exception with message '" << e.what() << "', benchmark terminated\n"; return EXIT_FAILURE; } catch (...) { cout << "ERROR: Unhandled exception, benchmark terminated\n"; return EXIT_FAILURE; } } int realMain(int argc, char* argv[])
benchmark/src/Main.cpp
C++
2fbf6ca81bb2e555f07ead299e5ecf8db17fdd7d
<|file_sep|>benchmark/src/Main.cpp.diff original: updated: #include <stdexcept> <|file_sep|>original/benchmark/src/Main.cpp using namespace std; int realMain(int argc, char* argv[]); int main(int argc, char* argv[]) { try { return realMain(argc, argv); } catch (...) { cout << "ERROR: Unhandled exception, benchmark terminated\n"; return EXIT_FAILURE; } } int realMain(int argc, char* argv[]) { printHeader(); Parameters parameters = readParameters(argc, argv); printParameters(parameters); <|file_sep|>current/benchmark/src/Main.cpp using namespace pica; using namespace std; int realMain(int argc, char* argv[]); int main(int argc, char* argv[]) { try { return realMain(argc, argv); } catch (...) { cout << "ERROR: Unhandled exception, benchmark terminated\n"; return EXIT_FAILURE; } } int realMain(int argc, char* argv[]) { printHeader(); Parameters parameters = readParameters(argc, argv); <|file_sep|>updated/benchmark/src/Main.cpp int realMain(int argc, char* argv[]); int main(int argc, char* argv[]) { try { return realMain(argc, argv); } catch (std::exception& e) { cout << "ERROR: Unhandled exception with message '" << e.what() << "', benchmark terminated\n"; return EXIT_FAILURE; } catch (...) { cout << "ERROR: Unhandled exception, benchmark terminated\n"; return EXIT_FAILURE; } } int realMain(int argc, char* argv[])
<|file_sep|>src/matchers/be_something.cc.diff original: updated: // Public methods. <|file_sep|>original/src/matchers/be_something.cc #include <ccspec/matchers/be_something.h> namespace ccspec { namespace matchers { const BeSomething& be = BeSomething::instance(); const BeSomething& BeSomething::instance() { static BeSomething instance; return instance; } BeSomething::BeSomething() {} } // namespace matchers } // namespace ccspec <|file_sep|>current/src/matchers/be_something.cc #include <ccspec/matchers/be_something.h> namespace ccspec { namespace matchers { const BeSomething& be = BeSomething::instance(); // Public methods. const BeSomething& BeSomething::instance() { static BeSomething instance; return instance; } BeSomething::BeSomething() {} } // namespace matchers } // namespace ccspec <|file_sep|>updated/src/matchers/be_something.cc
#include <ccspec/matchers/be_something.h> namespace ccspec { namespace matchers { const BeSomething& be = BeSomething::instance(); // Public methods. const BeSomething& BeSomething::instance() { static BeSomething instance; return instance; } // Private methods. BeSomething::BeSomething() {} } // namespace matchers } // namespace ccspec
src/matchers/be_something.cc
C++
e2ebaf0ca22235e18f6e3052d23b2929d18f6079
<|file_sep|>src/matchers/be_something.cc.diff original: updated: // Public methods. <|file_sep|>original/src/matchers/be_something.cc #include <ccspec/matchers/be_something.h> namespace ccspec { namespace matchers { const BeSomething& be = BeSomething::instance(); const BeSomething& BeSomething::instance() { static BeSomething instance; return instance; } BeSomething::BeSomething() {} } // namespace matchers } // namespace ccspec <|file_sep|>current/src/matchers/be_something.cc #include <ccspec/matchers/be_something.h> namespace ccspec { namespace matchers { const BeSomething& be = BeSomething::instance(); // Public methods. const BeSomething& BeSomething::instance() { static BeSomething instance; return instance; } BeSomething::BeSomething() {} } // namespace matchers } // namespace ccspec <|file_sep|>updated/src/matchers/be_something.cc #include <ccspec/matchers/be_something.h> namespace ccspec { namespace matchers { const BeSomething& be = BeSomething::instance(); // Public methods. const BeSomething& BeSomething::instance() { static BeSomething instance; return instance; } // Private methods. BeSomething::BeSomething() {} } // namespace matchers } // namespace ccspec
<|file_sep|>lib/sanitizer_common/tests/sanitizer_test_main.cc.diff original: updated: #include "sanitizer_common/sanitizer_flags.h" <|file_sep|>original/lib/sanitizer_common/tests/sanitizer_test_main.cc // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // // This file is a part of ThreadSanitizer/AddressSanitizer runtime. // //===----------------------------------------------------------------------===// #include "gtest/gtest.h" const char *argv0; int main(int argc, char **argv) { argv0 = argv[0]; testing::GTEST_FLAG(death_test_style) = "threadsafe"; testing::InitGoogleTest(&argc, argv); return RUN_ALL_TESTS(); } <|file_sep|>current/lib/sanitizer_common/tests/sanitizer_test_main.cc // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // // This file is a part of ThreadSanitizer/AddressSanitizer runtime. // //===----------------------------------------------------------------------===// #include "gtest/gtest.h" #include "sanitizer_common/sanitizer_flags.h" const char *argv0; int main(int argc, char **argv) { argv0 = argv[0]; testing::GTEST_FLAG(death_test_style) = "threadsafe"; testing::InitGoogleTest(&argc, argv); return RUN_ALL_TESTS(); } <|file_sep|>updated/lib/sanitizer_common/tests/sanitizer_test_main.cc
// // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // // This file is a part of ThreadSanitizer/AddressSanitizer runtime. // //===----------------------------------------------------------------------===// #include "gtest/gtest.h" #include "sanitizer_common/sanitizer_flags.h" const char *argv0; int main(int argc, char **argv) { argv0 = argv[0]; testing::GTEST_FLAG(death_test_style) = "threadsafe"; testing::InitGoogleTest(&argc, argv); SetCommonFlagsDefaults(); return RUN_ALL_TESTS(); }
lib/sanitizer_common/tests/sanitizer_test_main.cc
C++
c6a339a4b267bad46922e3f7f47f46cbe710827d
<|file_sep|>lib/sanitizer_common/tests/sanitizer_test_main.cc.diff original: updated: #include "sanitizer_common/sanitizer_flags.h" <|file_sep|>original/lib/sanitizer_common/tests/sanitizer_test_main.cc // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // // This file is a part of ThreadSanitizer/AddressSanitizer runtime. // //===----------------------------------------------------------------------===// #include "gtest/gtest.h" const char *argv0; int main(int argc, char **argv) { argv0 = argv[0]; testing::GTEST_FLAG(death_test_style) = "threadsafe"; testing::InitGoogleTest(&argc, argv); return RUN_ALL_TESTS(); } <|file_sep|>current/lib/sanitizer_common/tests/sanitizer_test_main.cc // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // // This file is a part of ThreadSanitizer/AddressSanitizer runtime. // //===----------------------------------------------------------------------===// #include "gtest/gtest.h" #include "sanitizer_common/sanitizer_flags.h" const char *argv0; int main(int argc, char **argv) { argv0 = argv[0]; testing::GTEST_FLAG(death_test_style) = "threadsafe"; testing::InitGoogleTest(&argc, argv); return RUN_ALL_TESTS(); } <|file_sep|>updated/lib/sanitizer_common/tests/sanitizer_test_main.cc // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // // This file is a part of ThreadSanitizer/AddressSanitizer runtime. // //===----------------------------------------------------------------------===// #include "gtest/gtest.h" #include "sanitizer_common/sanitizer_flags.h" const char *argv0; int main(int argc, char **argv) { argv0 = argv[0]; testing::GTEST_FLAG(death_test_style) = "threadsafe"; testing::InitGoogleTest(&argc, argv); SetCommonFlagsDefaults(); return RUN_ALL_TESTS(); }
<|file_sep|>examples/spdlog/foo.cpp.diff original: updated: #include <spdlog/sinks/stdout_sinks.h> <|file_sep|>original/examples/spdlog/foo.cpp #include <spdlog/spdlog.h> int main(int argc, char* argv[]) { auto console = spdlog::stdout_logger_mt("console"); console->info("Hello from INFO"); } <|file_sep|>current/examples/spdlog/foo.cpp #include <spdlog/spdlog.h> #include <spdlog/sinks/stdout_sinks.h> int main(int argc, char* argv[]) { auto console = spdlog::stdout_logger_mt("console"); console->info("Hello from INFO"); } <|file_sep|>updated/examples/spdlog/foo.cpp
#include <spdlog/spdlog.h> #include <spdlog/sinks/stdout_sinks.h> int main(int argc, char* argv[]) { auto console = spdlog::stdout_logger_mt("console"); console->info("Hello from INFO"); return 0; }
examples/spdlog/foo.cpp
C++
7e39bf7533b43f6572035c14bff34f06eaeec413
<|file_sep|>examples/spdlog/foo.cpp.diff original: updated: #include <spdlog/sinks/stdout_sinks.h> <|file_sep|>original/examples/spdlog/foo.cpp #include <spdlog/spdlog.h> int main(int argc, char* argv[]) { auto console = spdlog::stdout_logger_mt("console"); console->info("Hello from INFO"); } <|file_sep|>current/examples/spdlog/foo.cpp #include <spdlog/spdlog.h> #include <spdlog/sinks/stdout_sinks.h> int main(int argc, char* argv[]) { auto console = spdlog::stdout_logger_mt("console"); console->info("Hello from INFO"); } <|file_sep|>updated/examples/spdlog/foo.cpp #include <spdlog/spdlog.h> #include <spdlog/sinks/stdout_sinks.h> int main(int argc, char* argv[]) { auto console = spdlog::stdout_logger_mt("console"); console->info("Hello from INFO"); return 0; }
<|file_sep|>unittests/Support/DebugTest.cpp.diff original: updated: #ifndef NDEBUG <|file_sep|>original/unittests/Support/DebugTest.cpp #include "gtest/gtest.h" #include <string> using namespace llvm; TEST(DebugTest, Basic) { std::string s1, s2; raw_string_ostream os1(s1), os2(s2); static const char *DT[] = {"A", "B"}; llvm::DebugFlag = true; setCurrentDebugTypes(DT, 2); DEBUG_WITH_TYPE("A", os1 << "A"); DEBUG_WITH_TYPE("B", os1 << "B"); EXPECT_EQ("AB", os1.str()); setCurrentDebugType("A"); DEBUG_WITH_TYPE("A", os2 << "A"); DEBUG_WITH_TYPE("B", os2 << "B"); EXPECT_EQ("A", os2.str()); } <|file_sep|>current/unittests/Support/DebugTest.cpp #include <string> using namespace llvm; #ifndef NDEBUG TEST(DebugTest, Basic) { std::string s1, s2; raw_string_ostream os1(s1), os2(s2); static const char *DT[] = {"A", "B"}; llvm::DebugFlag = true; setCurrentDebugTypes(DT, 2); DEBUG_WITH_TYPE("A", os1 << "A"); DEBUG_WITH_TYPE("B", os1 << "B"); EXPECT_EQ("AB", os1.str()); setCurrentDebugType("A"); DEBUG_WITH_TYPE("A", os2 << "A"); DEBUG_WITH_TYPE("B", os2 << "B"); EXPECT_EQ("A", os2.str()); } <|file_sep|>updated/unittests/Support/DebugTest.cpp
#include <string> using namespace llvm; #ifndef NDEBUG TEST(DebugTest, Basic) { std::string s1, s2; raw_string_ostream os1(s1), os2(s2); static const char *DT[] = {"A", "B"}; llvm::DebugFlag = true; setCurrentDebugTypes(DT, 2); DEBUG_WITH_TYPE("A", os1 << "A"); DEBUG_WITH_TYPE("B", os1 << "B"); EXPECT_EQ("AB", os1.str()); setCurrentDebugType("A"); DEBUG_WITH_TYPE("A", os2 << "A"); DEBUG_WITH_TYPE("B", os2 << "B"); EXPECT_EQ("A", os2.str()); } #endif
unittests/Support/DebugTest.cpp
C++
e595a6f955108bfb28b68f1004b6216e27e02cb1
<|file_sep|>unittests/Support/DebugTest.cpp.diff original: updated: #ifndef NDEBUG <|file_sep|>original/unittests/Support/DebugTest.cpp #include "gtest/gtest.h" #include <string> using namespace llvm; TEST(DebugTest, Basic) { std::string s1, s2; raw_string_ostream os1(s1), os2(s2); static const char *DT[] = {"A", "B"}; llvm::DebugFlag = true; setCurrentDebugTypes(DT, 2); DEBUG_WITH_TYPE("A", os1 << "A"); DEBUG_WITH_TYPE("B", os1 << "B"); EXPECT_EQ("AB", os1.str()); setCurrentDebugType("A"); DEBUG_WITH_TYPE("A", os2 << "A"); DEBUG_WITH_TYPE("B", os2 << "B"); EXPECT_EQ("A", os2.str()); } <|file_sep|>current/unittests/Support/DebugTest.cpp #include <string> using namespace llvm; #ifndef NDEBUG TEST(DebugTest, Basic) { std::string s1, s2; raw_string_ostream os1(s1), os2(s2); static const char *DT[] = {"A", "B"}; llvm::DebugFlag = true; setCurrentDebugTypes(DT, 2); DEBUG_WITH_TYPE("A", os1 << "A"); DEBUG_WITH_TYPE("B", os1 << "B"); EXPECT_EQ("AB", os1.str()); setCurrentDebugType("A"); DEBUG_WITH_TYPE("A", os2 << "A"); DEBUG_WITH_TYPE("B", os2 << "B"); EXPECT_EQ("A", os2.str()); } <|file_sep|>updated/unittests/Support/DebugTest.cpp #include <string> using namespace llvm; #ifndef NDEBUG TEST(DebugTest, Basic) { std::string s1, s2; raw_string_ostream os1(s1), os2(s2); static const char *DT[] = {"A", "B"}; llvm::DebugFlag = true; setCurrentDebugTypes(DT, 2); DEBUG_WITH_TYPE("A", os1 << "A"); DEBUG_WITH_TYPE("B", os1 << "B"); EXPECT_EQ("AB", os1.str()); setCurrentDebugType("A"); DEBUG_WITH_TYPE("A", os2 << "A"); DEBUG_WITH_TYPE("B", os2 << "B"); EXPECT_EQ("A", os2.str()); } #endif
<|file_sep|>test/utilities/meta/meta.unary.prop.query/alignment_of.pass.cpp.diff original: updated: #if (defined(__ppc__) && !defined(__ppc64__)) test_alignment_of<bool, 4>(); // 32-bit PPC has four byte bool #else <|file_sep|>original/test/utilities/meta/meta.unary.prop.query/alignment_of.pass.cpp static_assert( std::alignment_of<const volatile T>::value == A, ""); } class Class { public: ~Class(); }; int main() { test_alignment_of<int&, 4>(); test_alignment_of<Class, 1>(); test_alignment_of<int*, sizeof(intptr_t)>(); test_alignment_of<const int*, sizeof(intptr_t)>(); test_alignment_of<char[3], 1>(); test_alignment_of<int, 4>(); test_alignment_of<double, 8>(); test_alignment_of<bool, 1>(); test_alignment_of<unsigned, 4>(); } <|file_sep|>current/test/utilities/meta/meta.unary.prop.query/alignment_of.pass.cpp class Class { public: ~Class(); }; int main() { test_alignment_of<int&, 4>(); test_alignment_of<Class, 1>(); test_alignment_of<int*, sizeof(intptr_t)>(); test_alignment_of<const int*, sizeof(intptr_t)>(); test_alignment_of<char[3], 1>(); test_alignment_of<int, 4>(); test_alignment_of<double, 8>(); #if (defined(__ppc__) && !defined(__ppc64__)) test_alignment_of<bool, 4>(); // 32-bit PPC has four byte bool #else test_alignment_of<bool, 1>(); test_alignment_of<unsigned, 4>(); } <|file_sep|>updated/test/utilities/meta/meta.unary.prop.query/alignment_of.pass.cpp
{ public: ~Class(); }; int main() { test_alignment_of<int&, 4>(); test_alignment_of<Class, 1>(); test_alignment_of<int*, sizeof(intptr_t)>(); test_alignment_of<const int*, sizeof(intptr_t)>(); test_alignment_of<char[3], 1>(); test_alignment_of<int, 4>(); test_alignment_of<double, 8>(); #if (defined(__ppc__) && !defined(__ppc64__)) test_alignment_of<bool, 4>(); // 32-bit PPC has four byte bool #else test_alignment_of<bool, 1>(); #endif test_alignment_of<unsigned, 4>(); }
test/utilities/meta/meta.unary.prop.query/alignment_of.pass.cpp
C++
e3c9d52d6de2d59752e9c20fce34eadec6b925bd
<|file_sep|>test/utilities/meta/meta.unary.prop.query/alignment_of.pass.cpp.diff original: updated: #if (defined(__ppc__) && !defined(__ppc64__)) test_alignment_of<bool, 4>(); // 32-bit PPC has four byte bool #else <|file_sep|>original/test/utilities/meta/meta.unary.prop.query/alignment_of.pass.cpp static_assert( std::alignment_of<const volatile T>::value == A, ""); } class Class { public: ~Class(); }; int main() { test_alignment_of<int&, 4>(); test_alignment_of<Class, 1>(); test_alignment_of<int*, sizeof(intptr_t)>(); test_alignment_of<const int*, sizeof(intptr_t)>(); test_alignment_of<char[3], 1>(); test_alignment_of<int, 4>(); test_alignment_of<double, 8>(); test_alignment_of<bool, 1>(); test_alignment_of<unsigned, 4>(); } <|file_sep|>current/test/utilities/meta/meta.unary.prop.query/alignment_of.pass.cpp class Class { public: ~Class(); }; int main() { test_alignment_of<int&, 4>(); test_alignment_of<Class, 1>(); test_alignment_of<int*, sizeof(intptr_t)>(); test_alignment_of<const int*, sizeof(intptr_t)>(); test_alignment_of<char[3], 1>(); test_alignment_of<int, 4>(); test_alignment_of<double, 8>(); #if (defined(__ppc__) && !defined(__ppc64__)) test_alignment_of<bool, 4>(); // 32-bit PPC has four byte bool #else test_alignment_of<bool, 1>(); test_alignment_of<unsigned, 4>(); } <|file_sep|>updated/test/utilities/meta/meta.unary.prop.query/alignment_of.pass.cpp { public: ~Class(); }; int main() { test_alignment_of<int&, 4>(); test_alignment_of<Class, 1>(); test_alignment_of<int*, sizeof(intptr_t)>(); test_alignment_of<const int*, sizeof(intptr_t)>(); test_alignment_of<char[3], 1>(); test_alignment_of<int, 4>(); test_alignment_of<double, 8>(); #if (defined(__ppc__) && !defined(__ppc64__)) test_alignment_of<bool, 4>(); // 32-bit PPC has four byte bool #else test_alignment_of<bool, 1>(); #endif test_alignment_of<unsigned, 4>(); }
<|file_sep|>config/config_type_int.cc.diff original: updated: #if !defined(__OPENNT) <|file_sep|>config/config_type_int.cc.diff original: updated: #endif <|file_sep|>config/config_type_int.cc.diff original: updated: #if !defined(__OPENNT) <|file_sep|>original/config/config_type_int.cc ConfigTypeInt config_type_int; bool ConfigTypeInt::set(ConfigValue *cv, const std::string& vstr) { if (ints_.find(cv) != ints_.end()) return (false); const char *str = vstr.c_str(); char *endp; intmax_t imax; imax = strtoimax(str, &endp, 0); if (*endp != '\0') return (false); ints_[cv] = imax; return (true); } <|file_sep|>current/config/config_type_int.cc ConfigTypeInt config_type_int; bool ConfigTypeInt::set(ConfigValue *cv, const std::string& vstr) { if (ints_.find(cv) != ints_.end()) return (false); const char *str = vstr.c_str(); char *endp; intmax_t imax; #if !defined(__OPENNT) imax = strtoimax(str, &endp, 0); if (*endp != '\0') return (false); ints_[cv] = imax; return (true); } <|file_sep|>updated/config/config_type_int.cc
ConfigTypeInt::set(ConfigValue *cv, const std::string& vstr) { if (ints_.find(cv) != ints_.end()) return (false); const char *str = vstr.c_str(); char *endp; intmax_t imax; #if !defined(__OPENNT) imax = strtoimax(str, &endp, 0); #else imax = strtoll(str, &endp, 0); #endif if (*endp != '\0') return (false); ints_[cv] = imax; return (true); }
config/config_type_int.cc
C++
15b2fd6e53d3642cc2ecb13ec3c9c039830cf0e4
<|file_sep|>config/config_type_int.cc.diff original: updated: #if !defined(__OPENNT) <|file_sep|>config/config_type_int.cc.diff original: updated: #endif <|file_sep|>config/config_type_int.cc.diff original: updated: #if !defined(__OPENNT) <|file_sep|>original/config/config_type_int.cc ConfigTypeInt config_type_int; bool ConfigTypeInt::set(ConfigValue *cv, const std::string& vstr) { if (ints_.find(cv) != ints_.end()) return (false); const char *str = vstr.c_str(); char *endp; intmax_t imax; imax = strtoimax(str, &endp, 0); if (*endp != '\0') return (false); ints_[cv] = imax; return (true); } <|file_sep|>current/config/config_type_int.cc ConfigTypeInt config_type_int; bool ConfigTypeInt::set(ConfigValue *cv, const std::string& vstr) { if (ints_.find(cv) != ints_.end()) return (false); const char *str = vstr.c_str(); char *endp; intmax_t imax; #if !defined(__OPENNT) imax = strtoimax(str, &endp, 0); if (*endp != '\0') return (false); ints_[cv] = imax; return (true); } <|file_sep|>updated/config/config_type_int.cc ConfigTypeInt::set(ConfigValue *cv, const std::string& vstr) { if (ints_.find(cv) != ints_.end()) return (false); const char *str = vstr.c_str(); char *endp; intmax_t imax; #if !defined(__OPENNT) imax = strtoimax(str, &endp, 0); #else imax = strtoll(str, &endp, 0); #endif if (*endp != '\0') return (false); ints_[cv] = imax; return (true); }
<|file_sep|>src/timermanager.cpp.diff original: updated: const auto max_id = last_id; <|file_sep|>original/src/timermanager.cpp if (it != timers.end()) { timers.erase(it); } } void TimerManager::update(float delta) { for (auto it = timers.begin(); it != timers.end(); ) { (*it)->remaining -= delta; // check if timer has expired if ((*it)->remaining <= 0.0f) { if ((*it)->callback) { (*it)->callback(); } if ((*it)->recurring) { <|file_sep|>current/src/timermanager.cpp if (it != timers.end()) { timers.erase(it); } } void TimerManager::update(float delta) { const auto max_id = last_id; for (auto it = timers.begin(); it != timers.end(); ) { (*it)->remaining -= delta; // check if timer has expired if ((*it)->remaining <= 0.0f) { if ((*it)->callback) { (*it)->callback(); } if ((*it)->recurring) <|file_sep|>updated/src/timermanager.cpp
timers.erase(it); } } void TimerManager::update(float delta) { const auto max_id = last_id; for (auto it = timers.begin(); it != timers.end(); ) { // only process timers up to current max during this frame if ((*it)->id > max_id) break; (*it)->remaining -= delta; // check if timer has expired if ((*it)->remaining <= 0.0f) { if ((*it)->callback) { (*it)->callback(); }
src/timermanager.cpp
C++
f2c2ac08b606a07a4de9e6071e9ae47a6d6f5792
<|file_sep|>src/timermanager.cpp.diff original: updated: const auto max_id = last_id; <|file_sep|>original/src/timermanager.cpp if (it != timers.end()) { timers.erase(it); } } void TimerManager::update(float delta) { for (auto it = timers.begin(); it != timers.end(); ) { (*it)->remaining -= delta; // check if timer has expired if ((*it)->remaining <= 0.0f) { if ((*it)->callback) { (*it)->callback(); } if ((*it)->recurring) { <|file_sep|>current/src/timermanager.cpp if (it != timers.end()) { timers.erase(it); } } void TimerManager::update(float delta) { const auto max_id = last_id; for (auto it = timers.begin(); it != timers.end(); ) { (*it)->remaining -= delta; // check if timer has expired if ((*it)->remaining <= 0.0f) { if ((*it)->callback) { (*it)->callback(); } if ((*it)->recurring) <|file_sep|>updated/src/timermanager.cpp timers.erase(it); } } void TimerManager::update(float delta) { const auto max_id = last_id; for (auto it = timers.begin(); it != timers.end(); ) { // only process timers up to current max during this frame if ((*it)->id > max_id) break; (*it)->remaining -= delta; // check if timer has expired if ((*it)->remaining <= 0.0f) { if ((*it)->callback) { (*it)->callback(); }
<|file_sep|>interface/src/main.cpp.diff original: updated: #include <iostream> <|file_sep|>original/interface/src/main.cpp #include "ofMain.h" #include "ofApp.h" #include <stdlib.h> int main(int argc, char* argv[]){ if (argc < 2) { exit(1); return 0; } else { ofSetupOpenGL(1024,768,OF_FULLSCREEN); ofRunApp(new ofApp(argv[1])); } } <|file_sep|>current/interface/src/main.cpp #include "ofMain.h" #include "ofApp.h" #include <iostream> #include <stdlib.h> int main(int argc, char* argv[]){ if (argc < 2) { exit(1); return 0; } else { ofSetupOpenGL(1024,768,OF_FULLSCREEN); ofRunApp(new ofApp(argv[1])); } } <|file_sep|>updated/interface/src/main.cpp
#include "ofMain.h" #include "ofApp.h" #include <iostream> #include <stdlib.h> int main(int argc, char* argv[]){ if (argc < 2) { cerr << "Usage: interface <socket path>"; exit(1); return 0; } else { ofSetupOpenGL(1024,768,OF_FULLSCREEN); ofRunApp(new ofApp(argv[1])); } }
interface/src/main.cpp
C++
e2bbd39a1acf94c8749c51f047f7552314ebc72f
<|file_sep|>interface/src/main.cpp.diff original: updated: #include <iostream> <|file_sep|>original/interface/src/main.cpp #include "ofMain.h" #include "ofApp.h" #include <stdlib.h> int main(int argc, char* argv[]){ if (argc < 2) { exit(1); return 0; } else { ofSetupOpenGL(1024,768,OF_FULLSCREEN); ofRunApp(new ofApp(argv[1])); } } <|file_sep|>current/interface/src/main.cpp #include "ofMain.h" #include "ofApp.h" #include <iostream> #include <stdlib.h> int main(int argc, char* argv[]){ if (argc < 2) { exit(1); return 0; } else { ofSetupOpenGL(1024,768,OF_FULLSCREEN); ofRunApp(new ofApp(argv[1])); } } <|file_sep|>updated/interface/src/main.cpp #include "ofMain.h" #include "ofApp.h" #include <iostream> #include <stdlib.h> int main(int argc, char* argv[]){ if (argc < 2) { cerr << "Usage: interface <socket path>"; exit(1); return 0; } else { ofSetupOpenGL(1024,768,OF_FULLSCREEN); ofRunApp(new ofApp(argv[1])); } }
<|file_sep|>views/controls/menu/menu_config_gtk.cc.diff original: updated: #if defined(TOUCH_UI) config->font = rb.GetFont(ResourceBundle::LargeFont); #else <|file_sep|>original/views/controls/menu/menu_config_gtk.cc #include "views/controls/menu/menu_config.h" #include "grit/app_resources.h" #include "third_party/skia/include/core/SkBitmap.h" #include "ui/base/resource/resource_bundle.h" namespace views { // static MenuConfig* MenuConfig::Create() { MenuConfig* config = new MenuConfig(); ResourceBundle& rb = ResourceBundle::GetSharedInstance(); config->font = rb.GetFont(ResourceBundle::BaseFont); config->arrow_width = rb.GetBitmapNamed(IDR_MENU_ARROW)->width(); // Add 4 to force some padding between check and label. config->check_width = rb.GetBitmapNamed(IDR_MENU_CHECK)->width() + 4; config->check_height = rb.GetBitmapNamed(IDR_MENU_CHECK)->height(); return config; } } // namespace views <|file_sep|>current/views/controls/menu/menu_config_gtk.cc #include "third_party/skia/include/core/SkBitmap.h" #include "ui/base/resource/resource_bundle.h" namespace views { // static MenuConfig* MenuConfig::Create() { MenuConfig* config = new MenuConfig(); ResourceBundle& rb = ResourceBundle::GetSharedInstance(); #if defined(TOUCH_UI) config->font = rb.GetFont(ResourceBundle::LargeFont); #else config->font = rb.GetFont(ResourceBundle::BaseFont); config->arrow_width = rb.GetBitmapNamed(IDR_MENU_ARROW)->width(); // Add 4 to force some padding between check and label. config->check_width = rb.GetBitmapNamed(IDR_MENU_CHECK)->width() + 4; config->check_height = rb.GetBitmapNamed(IDR_MENU_CHECK)->height(); return config; } } // namespace views <|file_sep|>updated/views/controls/menu/menu_config_gtk.cc
#include "ui/base/resource/resource_bundle.h" namespace views { // static MenuConfig* MenuConfig::Create() { MenuConfig* config = new MenuConfig(); ResourceBundle& rb = ResourceBundle::GetSharedInstance(); #if defined(TOUCH_UI) config->font = rb.GetFont(ResourceBundle::LargeFont); #else config->font = rb.GetFont(ResourceBundle::BaseFont); #endif config->arrow_width = rb.GetBitmapNamed(IDR_MENU_ARROW)->width(); // Add 4 to force some padding between check and label. config->check_width = rb.GetBitmapNamed(IDR_MENU_CHECK)->width() + 4; config->check_height = rb.GetBitmapNamed(IDR_MENU_CHECK)->height(); return config; } } // namespace views
views/controls/menu/menu_config_gtk.cc
C++
6a6579ac2dbb30ca5f86481cbdfe699ee76a47fe
<|file_sep|>views/controls/menu/menu_config_gtk.cc.diff original: updated: #if defined(TOUCH_UI) config->font = rb.GetFont(ResourceBundle::LargeFont); #else <|file_sep|>original/views/controls/menu/menu_config_gtk.cc #include "views/controls/menu/menu_config.h" #include "grit/app_resources.h" #include "third_party/skia/include/core/SkBitmap.h" #include "ui/base/resource/resource_bundle.h" namespace views { // static MenuConfig* MenuConfig::Create() { MenuConfig* config = new MenuConfig(); ResourceBundle& rb = ResourceBundle::GetSharedInstance(); config->font = rb.GetFont(ResourceBundle::BaseFont); config->arrow_width = rb.GetBitmapNamed(IDR_MENU_ARROW)->width(); // Add 4 to force some padding between check and label. config->check_width = rb.GetBitmapNamed(IDR_MENU_CHECK)->width() + 4; config->check_height = rb.GetBitmapNamed(IDR_MENU_CHECK)->height(); return config; } } // namespace views <|file_sep|>current/views/controls/menu/menu_config_gtk.cc #include "third_party/skia/include/core/SkBitmap.h" #include "ui/base/resource/resource_bundle.h" namespace views { // static MenuConfig* MenuConfig::Create() { MenuConfig* config = new MenuConfig(); ResourceBundle& rb = ResourceBundle::GetSharedInstance(); #if defined(TOUCH_UI) config->font = rb.GetFont(ResourceBundle::LargeFont); #else config->font = rb.GetFont(ResourceBundle::BaseFont); config->arrow_width = rb.GetBitmapNamed(IDR_MENU_ARROW)->width(); // Add 4 to force some padding between check and label. config->check_width = rb.GetBitmapNamed(IDR_MENU_CHECK)->width() + 4; config->check_height = rb.GetBitmapNamed(IDR_MENU_CHECK)->height(); return config; } } // namespace views <|file_sep|>updated/views/controls/menu/menu_config_gtk.cc #include "ui/base/resource/resource_bundle.h" namespace views { // static MenuConfig* MenuConfig::Create() { MenuConfig* config = new MenuConfig(); ResourceBundle& rb = ResourceBundle::GetSharedInstance(); #if defined(TOUCH_UI) config->font = rb.GetFont(ResourceBundle::LargeFont); #else config->font = rb.GetFont(ResourceBundle::BaseFont); #endif config->arrow_width = rb.GetBitmapNamed(IDR_MENU_ARROW)->width(); // Add 4 to force some padding between check and label. config->check_width = rb.GetBitmapNamed(IDR_MENU_CHECK)->width() + 4; config->check_height = rb.GetBitmapNamed(IDR_MENU_CHECK)->height(); return config; } } // namespace views
<|file_sep|>tests/libport/hmac-sha1.cc.diff original: updated: #include <libport/config.h> <|file_sep|>tests/libport/hmac-sha1.cc.diff original: updated: #ifdef LIBPORT_ENABLE_SSL <|file_sep|>original/tests/libport/hmac-sha1.cc #include <libport/unit-test.hh> using libport::test_suite; #include <iostream> static void test() { std::string msg = "GET\n\n\nTue, 27 Mar 2007 19:36:42 +0000\n" "/johnsmith/photos/puppy.jpg"; std::string key = "uV3F3YluFJax1cknvbcGwgjvx4QpvB+leU8dUj2o"; BOOST_CHECK_EQUAL(libport::base64(libport::hmac_sha1(msg, key)), "xXjDGYUmKxnwqr5KXNPGldn5LbA="); } test_suite* init_test_suite() { test_suite* suite = BOOST_TEST_SUITE("libport::hmac_sha1 test suite"); suite->add(BOOST_TEST_CASE(test)); return suite; } <|file_sep|>current/tests/libport/hmac-sha1.cc using libport::test_suite; #include <iostream> static void test() { #ifdef LIBPORT_ENABLE_SSL std::string msg = "GET\n\n\nTue, 27 Mar 2007 19:36:42 +0000\n" "/johnsmith/photos/puppy.jpg"; std::string key = "uV3F3YluFJax1cknvbcGwgjvx4QpvB+leU8dUj2o"; BOOST_CHECK_EQUAL(libport::base64(libport::hmac_sha1(msg, key)), "xXjDGYUmKxnwqr5KXNPGldn5LbA="); } test_suite* init_test_suite() { test_suite* suite = BOOST_TEST_SUITE("libport::hmac_sha1 test suite"); suite->add(BOOST_TEST_CASE(test)); return suite; } <|file_sep|>updated/tests/libport/hmac-sha1.cc
using libport::test_suite; #include <iostream> static void test() { #ifdef LIBPORT_ENABLE_SSL std::string msg = "GET\n\n\nTue, 27 Mar 2007 19:36:42 +0000\n" "/johnsmith/photos/puppy.jpg"; std::string key = "uV3F3YluFJax1cknvbcGwgjvx4QpvB+leU8dUj2o"; BOOST_CHECK_EQUAL(libport::base64(libport::hmac_sha1(msg, key)), "xXjDGYUmKxnwqr5KXNPGldn5LbA="); #endif } test_suite* init_test_suite() { test_suite* suite = BOOST_TEST_SUITE("libport::hmac_sha1 test suite"); suite->add(BOOST_TEST_CASE(test)); return suite; }
tests/libport/hmac-sha1.cc
C++
6b8dfd56512a667eb84d8c6412bb9e7a4e90faae
<|file_sep|>tests/libport/hmac-sha1.cc.diff original: updated: #include <libport/config.h> <|file_sep|>tests/libport/hmac-sha1.cc.diff original: updated: #ifdef LIBPORT_ENABLE_SSL <|file_sep|>original/tests/libport/hmac-sha1.cc #include <libport/unit-test.hh> using libport::test_suite; #include <iostream> static void test() { std::string msg = "GET\n\n\nTue, 27 Mar 2007 19:36:42 +0000\n" "/johnsmith/photos/puppy.jpg"; std::string key = "uV3F3YluFJax1cknvbcGwgjvx4QpvB+leU8dUj2o"; BOOST_CHECK_EQUAL(libport::base64(libport::hmac_sha1(msg, key)), "xXjDGYUmKxnwqr5KXNPGldn5LbA="); } test_suite* init_test_suite() { test_suite* suite = BOOST_TEST_SUITE("libport::hmac_sha1 test suite"); suite->add(BOOST_TEST_CASE(test)); return suite; } <|file_sep|>current/tests/libport/hmac-sha1.cc using libport::test_suite; #include <iostream> static void test() { #ifdef LIBPORT_ENABLE_SSL std::string msg = "GET\n\n\nTue, 27 Mar 2007 19:36:42 +0000\n" "/johnsmith/photos/puppy.jpg"; std::string key = "uV3F3YluFJax1cknvbcGwgjvx4QpvB+leU8dUj2o"; BOOST_CHECK_EQUAL(libport::base64(libport::hmac_sha1(msg, key)), "xXjDGYUmKxnwqr5KXNPGldn5LbA="); } test_suite* init_test_suite() { test_suite* suite = BOOST_TEST_SUITE("libport::hmac_sha1 test suite"); suite->add(BOOST_TEST_CASE(test)); return suite; } <|file_sep|>updated/tests/libport/hmac-sha1.cc using libport::test_suite; #include <iostream> static void test() { #ifdef LIBPORT_ENABLE_SSL std::string msg = "GET\n\n\nTue, 27 Mar 2007 19:36:42 +0000\n" "/johnsmith/photos/puppy.jpg"; std::string key = "uV3F3YluFJax1cknvbcGwgjvx4QpvB+leU8dUj2o"; BOOST_CHECK_EQUAL(libport::base64(libport::hmac_sha1(msg, key)), "xXjDGYUmKxnwqr5KXNPGldn5LbA="); #endif } test_suite* init_test_suite() { test_suite* suite = BOOST_TEST_SUITE("libport::hmac_sha1 test suite"); suite->add(BOOST_TEST_CASE(test)); return suite; }
<|file_sep|>test/libcxx/thread/thread.mutex/thread_safety_lock_guard.pass.cpp.diff original: updated: #if __cplusplus >= 201703L <|file_sep|>original/test/libcxx/thread/thread.mutex/thread_safety_lock_guard.pass.cpp // <mutex> // MODULES_DEFINES: _LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS #define _LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS #include <mutex> std::mutex m; int foo __attribute__((guarded_by(m))); static void scoped() { std::scoped_lock<std::mutex> lock(m); foo++; } int main() { scoped(); std::lock_guard<std::mutex> lock(m); foo++; } <|file_sep|>current/test/libcxx/thread/thread.mutex/thread_safety_lock_guard.pass.cpp // <mutex> // MODULES_DEFINES: _LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS #define _LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS #include <mutex> std::mutex m; int foo __attribute__((guarded_by(m))); static void scoped() { #if __cplusplus >= 201703L std::scoped_lock<std::mutex> lock(m); foo++; } int main() { scoped(); std::lock_guard<std::mutex> lock(m); foo++; } <|file_sep|>updated/test/libcxx/thread/thread.mutex/thread_safety_lock_guard.pass.cpp
// MODULES_DEFINES: _LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS #define _LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS #include <mutex> std::mutex m; int foo __attribute__((guarded_by(m))); static void scoped() { #if __cplusplus >= 201703L std::scoped_lock<std::mutex> lock(m); foo++; #endif } int main() { scoped(); std::lock_guard<std::mutex> lock(m); foo++; }
test/libcxx/thread/thread.mutex/thread_safety_lock_guard.pass.cpp
C++
c4edc5a9128b193b171272a3eaed056fef56da89
<|file_sep|>test/libcxx/thread/thread.mutex/thread_safety_lock_guard.pass.cpp.diff original: updated: #if __cplusplus >= 201703L <|file_sep|>original/test/libcxx/thread/thread.mutex/thread_safety_lock_guard.pass.cpp // <mutex> // MODULES_DEFINES: _LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS #define _LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS #include <mutex> std::mutex m; int foo __attribute__((guarded_by(m))); static void scoped() { std::scoped_lock<std::mutex> lock(m); foo++; } int main() { scoped(); std::lock_guard<std::mutex> lock(m); foo++; } <|file_sep|>current/test/libcxx/thread/thread.mutex/thread_safety_lock_guard.pass.cpp // <mutex> // MODULES_DEFINES: _LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS #define _LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS #include <mutex> std::mutex m; int foo __attribute__((guarded_by(m))); static void scoped() { #if __cplusplus >= 201703L std::scoped_lock<std::mutex> lock(m); foo++; } int main() { scoped(); std::lock_guard<std::mutex> lock(m); foo++; } <|file_sep|>updated/test/libcxx/thread/thread.mutex/thread_safety_lock_guard.pass.cpp // MODULES_DEFINES: _LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS #define _LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS #include <mutex> std::mutex m; int foo __attribute__((guarded_by(m))); static void scoped() { #if __cplusplus >= 201703L std::scoped_lock<std::mutex> lock(m); foo++; #endif } int main() { scoped(); std::lock_guard<std::mutex> lock(m); foo++; }
<|file_sep|>src/mediaplayer/main.cpp.diff original: updated: qDebug() << "Xine player started"; <|file_sep|>original/src/mediaplayer/main.cpp << "Can't seem to register dbus service:" << QDBusConnection::sessionBus().lastError().message(); app.exit(-1); } AbstractMediaPlayer *player = 0; #ifdef XINE_PLAYER #warning using xine backend player = new XinePlayer(&app); #else #warning using qDebug testing backend player = new TestingPlayer(&app); #endif dbusRegistration = QDBusConnection::sessionBus().registerObject("/", player, QDBusConnection::ExportScriptableSlots|QDBusConnection::ExportScriptableSignals); if (!dbusRegistration) { qDebug() << "Can't seem to register dbus object:" << QDBusConnection::sessionBus().lastError().message(); app.exit(-1); <|file_sep|>current/src/mediaplayer/main.cpp << "Can't seem to register dbus service:" << QDBusConnection::sessionBus().lastError().message(); app.exit(-1); } AbstractMediaPlayer *player = 0; #ifdef XINE_PLAYER #warning using xine backend qDebug() << "Xine player started"; player = new XinePlayer(&app); #else #warning using qDebug testing backend player = new TestingPlayer(&app); #endif dbusRegistration = QDBusConnection::sessionBus().registerObject("/", player, QDBusConnection::ExportScriptableSlots|QDBusConnection::ExportScriptableSignals); if (!dbusRegistration) { qDebug() << "Can't seem to register dbus object:" << QDBusConnection::sessionBus().lastError().message(); <|file_sep|>updated/src/mediaplayer/main.cpp
<< QDBusConnection::sessionBus().lastError().message(); app.exit(-1); } AbstractMediaPlayer *player = 0; #ifdef XINE_PLAYER #warning using xine backend qDebug() << "Xine player started"; player = new XinePlayer(&app); #else #warning using qDebug testing backend qDebug() << "qDebug player started"; player = new TestingPlayer(&app); #endif dbusRegistration = QDBusConnection::sessionBus().registerObject("/", player, QDBusConnection::ExportScriptableSlots|QDBusConnection::ExportScriptableSignals); if (!dbusRegistration) { qDebug() << "Can't seem to register dbus object:" << QDBusConnection::sessionBus().lastError().message();
src/mediaplayer/main.cpp
C++
6ac3e7af4c18b5f8f9cb309a97d08c0a672b0417
<|file_sep|>src/mediaplayer/main.cpp.diff original: updated: qDebug() << "Xine player started"; <|file_sep|>original/src/mediaplayer/main.cpp << "Can't seem to register dbus service:" << QDBusConnection::sessionBus().lastError().message(); app.exit(-1); } AbstractMediaPlayer *player = 0; #ifdef XINE_PLAYER #warning using xine backend player = new XinePlayer(&app); #else #warning using qDebug testing backend player = new TestingPlayer(&app); #endif dbusRegistration = QDBusConnection::sessionBus().registerObject("/", player, QDBusConnection::ExportScriptableSlots|QDBusConnection::ExportScriptableSignals); if (!dbusRegistration) { qDebug() << "Can't seem to register dbus object:" << QDBusConnection::sessionBus().lastError().message(); app.exit(-1); <|file_sep|>current/src/mediaplayer/main.cpp << "Can't seem to register dbus service:" << QDBusConnection::sessionBus().lastError().message(); app.exit(-1); } AbstractMediaPlayer *player = 0; #ifdef XINE_PLAYER #warning using xine backend qDebug() << "Xine player started"; player = new XinePlayer(&app); #else #warning using qDebug testing backend player = new TestingPlayer(&app); #endif dbusRegistration = QDBusConnection::sessionBus().registerObject("/", player, QDBusConnection::ExportScriptableSlots|QDBusConnection::ExportScriptableSignals); if (!dbusRegistration) { qDebug() << "Can't seem to register dbus object:" << QDBusConnection::sessionBus().lastError().message(); <|file_sep|>updated/src/mediaplayer/main.cpp << QDBusConnection::sessionBus().lastError().message(); app.exit(-1); } AbstractMediaPlayer *player = 0; #ifdef XINE_PLAYER #warning using xine backend qDebug() << "Xine player started"; player = new XinePlayer(&app); #else #warning using qDebug testing backend qDebug() << "qDebug player started"; player = new TestingPlayer(&app); #endif dbusRegistration = QDBusConnection::sessionBus().registerObject("/", player, QDBusConnection::ExportScriptableSlots|QDBusConnection::ExportScriptableSignals); if (!dbusRegistration) { qDebug() << "Can't seem to register dbus object:" << QDBusConnection::sessionBus().lastError().message();
<|file_sep|>src/search/util/timeout.cc.diff original: updated: sa.sa_flags = 0; sa.sa_sigaction = NULL; sa.sa_restorer = NULL; <|file_sep|>original/src/search/util/timeout.cc { cout << "No Solution" << endl << "cost: infinity" << endl << "length: infinity" << endl << "wall_time: infinity" << endl << "CPU_time: infinity" << endl << "generated: infinity" << endl << "expanded: infinity" << endl; exit(EXIT_SUCCESS); } void timeout(unsigned int sec) { struct sigaction sa; sa.sa_handler = alarm_action; sigaction(SIGALRM, &sa, NULL); alarm(sec); } <|file_sep|>current/src/search/util/timeout.cc << "length: infinity" << endl << "wall_time: infinity" << endl << "CPU_time: infinity" << endl << "generated: infinity" << endl << "expanded: infinity" << endl; exit(EXIT_SUCCESS); } void timeout(unsigned int sec) { struct sigaction sa; sa.sa_flags = 0; sa.sa_sigaction = NULL; sa.sa_restorer = NULL; sa.sa_handler = alarm_action; sigaction(SIGALRM, &sa, NULL); alarm(sec); } <|file_sep|>updated/src/search/util/timeout.cc
<< "wall_time: infinity" << endl << "CPU_time: infinity" << endl << "generated: infinity" << endl << "expanded: infinity" << endl; exit(EXIT_SUCCESS); } void timeout(unsigned int sec) { struct sigaction sa; sa.sa_flags = 0; sa.sa_sigaction = NULL; sa.sa_restorer = NULL; sa.sa_handler = alarm_action; sigfillset(&sa.sa_mask); sigaction(SIGALRM, &sa, NULL); alarm(sec); }
src/search/util/timeout.cc
C++
4f4fcf4969d4e233024bd0d9397facc0906db49e
<|file_sep|>src/search/util/timeout.cc.diff original: updated: sa.sa_flags = 0; sa.sa_sigaction = NULL; sa.sa_restorer = NULL; <|file_sep|>original/src/search/util/timeout.cc { cout << "No Solution" << endl << "cost: infinity" << endl << "length: infinity" << endl << "wall_time: infinity" << endl << "CPU_time: infinity" << endl << "generated: infinity" << endl << "expanded: infinity" << endl; exit(EXIT_SUCCESS); } void timeout(unsigned int sec) { struct sigaction sa; sa.sa_handler = alarm_action; sigaction(SIGALRM, &sa, NULL); alarm(sec); } <|file_sep|>current/src/search/util/timeout.cc << "length: infinity" << endl << "wall_time: infinity" << endl << "CPU_time: infinity" << endl << "generated: infinity" << endl << "expanded: infinity" << endl; exit(EXIT_SUCCESS); } void timeout(unsigned int sec) { struct sigaction sa; sa.sa_flags = 0; sa.sa_sigaction = NULL; sa.sa_restorer = NULL; sa.sa_handler = alarm_action; sigaction(SIGALRM, &sa, NULL); alarm(sec); } <|file_sep|>updated/src/search/util/timeout.cc << "wall_time: infinity" << endl << "CPU_time: infinity" << endl << "generated: infinity" << endl << "expanded: infinity" << endl; exit(EXIT_SUCCESS); } void timeout(unsigned int sec) { struct sigaction sa; sa.sa_flags = 0; sa.sa_sigaction = NULL; sa.sa_restorer = NULL; sa.sa_handler = alarm_action; sigfillset(&sa.sa_mask); sigaction(SIGALRM, &sa, NULL); alarm(sec); }
<|file_sep|>config/config_type_int.cc.diff original: updated: #if !defined(__OPENNT) <|file_sep|>config/config_type_int.cc.diff original: updated: #endif <|file_sep|>config/config_type_int.cc.diff original: updated: #if !defined(__OPENNT) <|file_sep|>original/config/config_type_int.cc ConfigTypeInt config_type_int; bool ConfigTypeInt::set(ConfigValue *cv, const std::string& vstr) { if (ints_.find(cv) != ints_.end()) return (false); const char *str = vstr.c_str(); char *endp; intmax_t imax; imax = strtoimax(str, &endp, 0); if (*endp != '\0') return (false); ints_[cv] = imax; return (true); } <|file_sep|>current/config/config_type_int.cc ConfigTypeInt config_type_int; bool ConfigTypeInt::set(ConfigValue *cv, const std::string& vstr) { if (ints_.find(cv) != ints_.end()) return (false); const char *str = vstr.c_str(); char *endp; intmax_t imax; #if !defined(__OPENNT) imax = strtoimax(str, &endp, 0); if (*endp != '\0') return (false); ints_[cv] = imax; return (true); } <|file_sep|>updated/config/config_type_int.cc
ConfigTypeInt::set(ConfigValue *cv, const std::string& vstr) { if (ints_.find(cv) != ints_.end()) return (false); const char *str = vstr.c_str(); char *endp; intmax_t imax; #if !defined(__OPENNT) imax = strtoimax(str, &endp, 0); #else imax = strtoll(str, &endp, 0); #endif if (*endp != '\0') return (false); ints_[cv] = imax; return (true); }
config/config_type_int.cc
C++
a42fc98e14d57b919ce192a2d442399520b06eec
<|file_sep|>config/config_type_int.cc.diff original: updated: #if !defined(__OPENNT) <|file_sep|>config/config_type_int.cc.diff original: updated: #endif <|file_sep|>config/config_type_int.cc.diff original: updated: #if !defined(__OPENNT) <|file_sep|>original/config/config_type_int.cc ConfigTypeInt config_type_int; bool ConfigTypeInt::set(ConfigValue *cv, const std::string& vstr) { if (ints_.find(cv) != ints_.end()) return (false); const char *str = vstr.c_str(); char *endp; intmax_t imax; imax = strtoimax(str, &endp, 0); if (*endp != '\0') return (false); ints_[cv] = imax; return (true); } <|file_sep|>current/config/config_type_int.cc ConfigTypeInt config_type_int; bool ConfigTypeInt::set(ConfigValue *cv, const std::string& vstr) { if (ints_.find(cv) != ints_.end()) return (false); const char *str = vstr.c_str(); char *endp; intmax_t imax; #if !defined(__OPENNT) imax = strtoimax(str, &endp, 0); if (*endp != '\0') return (false); ints_[cv] = imax; return (true); } <|file_sep|>updated/config/config_type_int.cc ConfigTypeInt::set(ConfigValue *cv, const std::string& vstr) { if (ints_.find(cv) != ints_.end()) return (false); const char *str = vstr.c_str(); char *endp; intmax_t imax; #if !defined(__OPENNT) imax = strtoimax(str, &endp, 0); #else imax = strtoll(str, &endp, 0); #endif if (*endp != '\0') return (false); ints_[cv] = imax; return (true); }
<|file_sep|>viewer/KVProxy.cpp.diff original: updated: #include <string> <|file_sep|>original/viewer/KVProxy.cpp QObject(parent), p("127.0.0.1", port) { // Make the poll timer tell the proxy to poll; this will be started with // a timeout of 0, so it will effectively poll on every event loop tick connect(&pollTimer, SIGNAL(timeout()), this, SLOT(poll())); // Pass on new connections to a function in KVProxy_p p.on_connection([this](HttpProxy::Connection::Ptr con) { proxyHandleConnection(this, con); }); } KVProxy::~KVProxy() { } int KVProxy::port() { return p.get_local_port_number(); } <|file_sep|>current/viewer/KVProxy.cpp KVProxy::KVProxy(QObject *parent, unsigned short port) : QObject(parent), p("127.0.0.1", port) { // Make the poll timer tell the proxy to poll; this will be started with // a timeout of 0, so it will effectively poll on every event loop tick connect(&pollTimer, SIGNAL(timeout()), this, SLOT(poll())); // Pass on new connections to a function in KVProxy_p p.on_connection([this](HttpProxy::Connection::Ptr con) { proxyHandleConnection(this, con); }); } KVProxy::~KVProxy() { } int KVProxy::port() { return p.get_local_port_number(); <|file_sep|>updated/viewer/KVProxy.cpp
{ // Make the poll timer tell the proxy to poll; this will be started with // a timeout of 0, so it will effectively poll on every event loop tick connect(&pollTimer, SIGNAL(timeout()), this, SLOT(poll())); // Pass on new connections to a function in KVProxy_p p.on_connection([this](HttpProxy::Connection::Ptr con) { proxyHandleConnection(this, con); }); p.on_error([](std::string str, bool){ qDebug() << "Proxy Error: " << str.c_str(); }); } KVProxy::~KVProxy() { } int KVProxy::port()
viewer/KVProxy.cpp
C++
96dc7e1aecba90488cec2618f8037d36fd2bfd92
<|file_sep|>viewer/KVProxy.cpp.diff original: updated: #include <string> <|file_sep|>original/viewer/KVProxy.cpp QObject(parent), p("127.0.0.1", port) { // Make the poll timer tell the proxy to poll; this will be started with // a timeout of 0, so it will effectively poll on every event loop tick connect(&pollTimer, SIGNAL(timeout()), this, SLOT(poll())); // Pass on new connections to a function in KVProxy_p p.on_connection([this](HttpProxy::Connection::Ptr con) { proxyHandleConnection(this, con); }); } KVProxy::~KVProxy() { } int KVProxy::port() { return p.get_local_port_number(); } <|file_sep|>current/viewer/KVProxy.cpp KVProxy::KVProxy(QObject *parent, unsigned short port) : QObject(parent), p("127.0.0.1", port) { // Make the poll timer tell the proxy to poll; this will be started with // a timeout of 0, so it will effectively poll on every event loop tick connect(&pollTimer, SIGNAL(timeout()), this, SLOT(poll())); // Pass on new connections to a function in KVProxy_p p.on_connection([this](HttpProxy::Connection::Ptr con) { proxyHandleConnection(this, con); }); } KVProxy::~KVProxy() { } int KVProxy::port() { return p.get_local_port_number(); <|file_sep|>updated/viewer/KVProxy.cpp { // Make the poll timer tell the proxy to poll; this will be started with // a timeout of 0, so it will effectively poll on every event loop tick connect(&pollTimer, SIGNAL(timeout()), this, SLOT(poll())); // Pass on new connections to a function in KVProxy_p p.on_connection([this](HttpProxy::Connection::Ptr con) { proxyHandleConnection(this, con); }); p.on_error([](std::string str, bool){ qDebug() << "Proxy Error: " << str.c_str(); }); } KVProxy::~KVProxy() { } int KVProxy::port()
<|file_sep|>test-cascades-lib/test-cascades-lib-xmpp/src/XmppHarness.cpp.diff original: updated: #include "XmppDisconnectCommand.h" <|file_sep|>original/test-cascades-lib/test-cascades-lib-xmpp/src/XmppHarness.cpp } bool XmppHarness::installHarness() { XMPPResourceStore::initialiseStore(this); CommandFactory::installCommand( XMPPHelpCommand::getCmd(), &XMPPHelpCommand::create); CommandFactory::installCommand( XMPPConnectCommand::getCmd(), &XMPPConnectCommand::create); CommandFactory::installCommand( XMPPPresenceCommand::getCmd(), &XMPPPresenceCommand::create); CommandFactory::installCommand( XMPPMessageCommand::getCmd(), &XMPPMessageCommand::create); return true; } } // namespace cascades } // namespace test } // namespace truphone <|file_sep|>current/test-cascades-lib/test-cascades-lib-xmpp/src/XmppHarness.cpp } bool XmppHarness::installHarness() { XMPPResourceStore::initialiseStore(this); CommandFactory::installCommand( XMPPHelpCommand::getCmd(), &XMPPHelpCommand::create); CommandFactory::installCommand( XMPPConnectCommand::getCmd(), &XMPPConnectCommand::create); CommandFactory::installCommand( XMPPPresenceCommand::getCmd(), &XMPPPresenceCommand::create); CommandFactory::installCommand( XMPPMessageCommand::getCmd(), &XMPPMessageCommand::create); return true; } } // namespace cascades } // namespace test } // namespace truphone <|file_sep|>updated/test-cascades-lib/test-cascades-lib-xmpp/src/XmppHarness.cpp
XMPPResourceStore::initialiseStore(this); CommandFactory::installCommand( XMPPHelpCommand::getCmd(), &XMPPHelpCommand::create); CommandFactory::installCommand( XMPPConnectCommand::getCmd(), &XMPPConnectCommand::create); CommandFactory::installCommand( XMPPPresenceCommand::getCmd(), &XMPPPresenceCommand::create); CommandFactory::installCommand( XMPPMessageCommand::getCmd(), &XMPPMessageCommand::create); CommandFactory::installCommand( XMPPDisconnectCommand::getCmd(), &XMPPDisconnectCommand::create); return true; } } // namespace cascades } // namespace test } // namespace truphone
test-cascades-lib/test-cascades-lib-xmpp/src/XmppHarness.cpp
C++
998581e6910ccf34390d2b021124cf449b361295
<|file_sep|>test-cascades-lib/test-cascades-lib-xmpp/src/XmppHarness.cpp.diff original: updated: #include "XmppDisconnectCommand.h" <|file_sep|>original/test-cascades-lib/test-cascades-lib-xmpp/src/XmppHarness.cpp } bool XmppHarness::installHarness() { XMPPResourceStore::initialiseStore(this); CommandFactory::installCommand( XMPPHelpCommand::getCmd(), &XMPPHelpCommand::create); CommandFactory::installCommand( XMPPConnectCommand::getCmd(), &XMPPConnectCommand::create); CommandFactory::installCommand( XMPPPresenceCommand::getCmd(), &XMPPPresenceCommand::create); CommandFactory::installCommand( XMPPMessageCommand::getCmd(), &XMPPMessageCommand::create); return true; } } // namespace cascades } // namespace test } // namespace truphone <|file_sep|>current/test-cascades-lib/test-cascades-lib-xmpp/src/XmppHarness.cpp } bool XmppHarness::installHarness() { XMPPResourceStore::initialiseStore(this); CommandFactory::installCommand( XMPPHelpCommand::getCmd(), &XMPPHelpCommand::create); CommandFactory::installCommand( XMPPConnectCommand::getCmd(), &XMPPConnectCommand::create); CommandFactory::installCommand( XMPPPresenceCommand::getCmd(), &XMPPPresenceCommand::create); CommandFactory::installCommand( XMPPMessageCommand::getCmd(), &XMPPMessageCommand::create); return true; } } // namespace cascades } // namespace test } // namespace truphone <|file_sep|>updated/test-cascades-lib/test-cascades-lib-xmpp/src/XmppHarness.cpp XMPPResourceStore::initialiseStore(this); CommandFactory::installCommand( XMPPHelpCommand::getCmd(), &XMPPHelpCommand::create); CommandFactory::installCommand( XMPPConnectCommand::getCmd(), &XMPPConnectCommand::create); CommandFactory::installCommand( XMPPPresenceCommand::getCmd(), &XMPPPresenceCommand::create); CommandFactory::installCommand( XMPPMessageCommand::getCmd(), &XMPPMessageCommand::create); CommandFactory::installCommand( XMPPDisconnectCommand::getCmd(), &XMPPDisconnectCommand::create); return true; } } // namespace cascades } // namespace test } // namespace truphone
<|file_sep|>thrift/lib/cpp2/async/ClientChannel.cpp.diff original: updated: #ifdef __linux__ #include <sys/utsname.h> #endif <|file_sep|>thrift/lib/cpp2/async/ClientChannel.cpp.diff original: updated: #ifdef __linux__ struct utsname bufs; ::uname(&bufs); return bufs.nodename; #else <|file_sep|>original/thrift/lib/cpp2/async/ClientChannel.cpp */ #include <thrift/lib/cpp2/async/ClientChannel.h> #include <thrift/lib/cpp2/PluggableFunction.h> namespace apache { namespace thrift { namespace { THRIFT_PLUGGABLE_FUNC_REGISTER(std::optional<std::string>, getClientHostId) { return {}; } } // namespace /* static */ const std::optional<std::string>& ClientChannel::getHostId() { static const auto& hostId = *new std::optional<std::string>{THRIFT_PLUGGABLE_FUNC(getClientHostId)()}; return hostId; } } // namespace thrift } // namespace apache <|file_sep|>current/thrift/lib/cpp2/async/ClientChannel.cpp namespace apache { namespace thrift { namespace { THRIFT_PLUGGABLE_FUNC_REGISTER(std::optional<std::string>, getClientHostId) { #ifdef __linux__ struct utsname bufs; ::uname(&bufs); return bufs.nodename; #else return {}; } } // namespace /* static */ const std::optional<std::string>& ClientChannel::getHostId() { static const auto& hostId = *new std::optional<std::string>{THRIFT_PLUGGABLE_FUNC(getClientHostId)()}; return hostId; } } // namespace thrift } // namespace apache <|file_sep|>updated/thrift/lib/cpp2/async/ClientChannel.cpp
namespace apache { namespace thrift { namespace { THRIFT_PLUGGABLE_FUNC_REGISTER(std::optional<std::string>, getClientHostId) { #ifdef __linux__ struct utsname bufs; ::uname(&bufs); return bufs.nodename; #else return {}; #endif } } // namespace /* static */ const std::optional<std::string>& ClientChannel::getHostId() { static const auto& hostId = *new std::optional<std::string>{THRIFT_PLUGGABLE_FUNC(getClientHostId)()}; return hostId; } } // namespace thrift } // namespace apache
thrift/lib/cpp2/async/ClientChannel.cpp
C++
3909c78c547500694d66f4b33e22dd98c1574bcd
<|file_sep|>thrift/lib/cpp2/async/ClientChannel.cpp.diff original: updated: #ifdef __linux__ #include <sys/utsname.h> #endif <|file_sep|>thrift/lib/cpp2/async/ClientChannel.cpp.diff original: updated: #ifdef __linux__ struct utsname bufs; ::uname(&bufs); return bufs.nodename; #else <|file_sep|>original/thrift/lib/cpp2/async/ClientChannel.cpp */ #include <thrift/lib/cpp2/async/ClientChannel.h> #include <thrift/lib/cpp2/PluggableFunction.h> namespace apache { namespace thrift { namespace { THRIFT_PLUGGABLE_FUNC_REGISTER(std::optional<std::string>, getClientHostId) { return {}; } } // namespace /* static */ const std::optional<std::string>& ClientChannel::getHostId() { static const auto& hostId = *new std::optional<std::string>{THRIFT_PLUGGABLE_FUNC(getClientHostId)()}; return hostId; } } // namespace thrift } // namespace apache <|file_sep|>current/thrift/lib/cpp2/async/ClientChannel.cpp namespace apache { namespace thrift { namespace { THRIFT_PLUGGABLE_FUNC_REGISTER(std::optional<std::string>, getClientHostId) { #ifdef __linux__ struct utsname bufs; ::uname(&bufs); return bufs.nodename; #else return {}; } } // namespace /* static */ const std::optional<std::string>& ClientChannel::getHostId() { static const auto& hostId = *new std::optional<std::string>{THRIFT_PLUGGABLE_FUNC(getClientHostId)()}; return hostId; } } // namespace thrift } // namespace apache <|file_sep|>updated/thrift/lib/cpp2/async/ClientChannel.cpp namespace apache { namespace thrift { namespace { THRIFT_PLUGGABLE_FUNC_REGISTER(std::optional<std::string>, getClientHostId) { #ifdef __linux__ struct utsname bufs; ::uname(&bufs); return bufs.nodename; #else return {}; #endif } } // namespace /* static */ const std::optional<std::string>& ClientChannel::getHostId() { static const auto& hostId = *new std::optional<std::string>{THRIFT_PLUGGABLE_FUNC(getClientHostId)()}; return hostId; } } // namespace thrift } // namespace apache
<|file_sep|>src/geom/prep/PreparedPoint.cpp.diff original: updated: #include <geos/geom/Point.h> <|file_sep|>original/src/geom/prep/PreparedPoint.cpp **********************************************************************/ #include <geos/geom/prep/PreparedPoint.h> namespace geos { namespace geom { // geos.geom namespace prep { // geos.geom.prep bool PreparedPoint::intersects(const geom::Geometry* g) const { if (! envelopesIntersect( g)) return false; // This avoids computing topology for the test geometry return isAnyTargetComponentInTest( g); } } // namespace geos.geom.prep } // namespace geos.geom } // namespace geos <|file_sep|>current/src/geom/prep/PreparedPoint.cpp #include <geos/geom/prep/PreparedPoint.h> #include <geos/geom/Point.h> namespace geos { namespace geom { // geos.geom namespace prep { // geos.geom.prep bool PreparedPoint::intersects(const geom::Geometry* g) const { if (! envelopesIntersect( g)) return false; // This avoids computing topology for the test geometry return isAnyTargetComponentInTest( g); } } // namespace geos.geom.prep } // namespace geos.geom } // namespace geos <|file_sep|>updated/src/geom/prep/PreparedPoint.cpp
namespace geos { namespace geom { // geos.geom namespace prep { // geos.geom.prep bool PreparedPoint::intersects(const geom::Geometry* g) const { if (! envelopesIntersect( g)) return false; const Point *pt_geom = dynamic_cast<const Point *>(g); if (pt_geom) return getGeometry().equals(g); // This avoids computing topology for the test geometry return isAnyTargetComponentInTest( g); } } // namespace geos.geom.prep } // namespace geos.geom } // namespace geos
src/geom/prep/PreparedPoint.cpp
C++
7017f79eb59b91d44a2fb4a50a8b329e720dacba
<|file_sep|>src/geom/prep/PreparedPoint.cpp.diff original: updated: #include <geos/geom/Point.h> <|file_sep|>original/src/geom/prep/PreparedPoint.cpp **********************************************************************/ #include <geos/geom/prep/PreparedPoint.h> namespace geos { namespace geom { // geos.geom namespace prep { // geos.geom.prep bool PreparedPoint::intersects(const geom::Geometry* g) const { if (! envelopesIntersect( g)) return false; // This avoids computing topology for the test geometry return isAnyTargetComponentInTest( g); } } // namespace geos.geom.prep } // namespace geos.geom } // namespace geos <|file_sep|>current/src/geom/prep/PreparedPoint.cpp #include <geos/geom/prep/PreparedPoint.h> #include <geos/geom/Point.h> namespace geos { namespace geom { // geos.geom namespace prep { // geos.geom.prep bool PreparedPoint::intersects(const geom::Geometry* g) const { if (! envelopesIntersect( g)) return false; // This avoids computing topology for the test geometry return isAnyTargetComponentInTest( g); } } // namespace geos.geom.prep } // namespace geos.geom } // namespace geos <|file_sep|>updated/src/geom/prep/PreparedPoint.cpp namespace geos { namespace geom { // geos.geom namespace prep { // geos.geom.prep bool PreparedPoint::intersects(const geom::Geometry* g) const { if (! envelopesIntersect( g)) return false; const Point *pt_geom = dynamic_cast<const Point *>(g); if (pt_geom) return getGeometry().equals(g); // This avoids computing topology for the test geometry return isAnyTargetComponentInTest( g); } } // namespace geos.geom.prep } // namespace geos.geom } // namespace geos
<|file_sep|>Haxe/Templates/Source/HaxeRuntime/Private/uhx/RuntimeLibrary.cpp.diff original: updated: #ifndef UHX_NO_UOBJECT <|file_sep|>original/Haxe/Templates/Source/HaxeRuntime/Private/uhx/RuntimeLibrary.cpp #if defined(_MSC_VER) unreal::UIntPtr *uhx::ue::RuntimeLibrary_obj::tlsObj = nullptr; #elif defined(__GNUC__) thread_local unreal::UIntPtr *uhx::ue::RuntimeLibrary_obj::tlsObj = nullptr; #else static int uhx_tls_obj = FPlatformTLS::AllocTlsSlot(); unreal::UIntPtr uhx::ue::RuntimeLibrary_obj::getTlsObj() { unreal::UIntPtr *ret = (unreal::UIntPtr *) FPlatformTLS::GetTlsValue(uhx_tls_obj); if (!ret) { ret = (unreal::UIntPtr*) uhx::GcRef::createRoot(); FPlatformTLS::SetTlsValue(uhx_tls_obj, (void*) ret); return *ret = uhx::expose::HxcppRuntime::createArray(); } return *ret; } #endif int uhx::ue::RuntimeLibrary_obj::allocTlsSlot() { return FPlatformAtomics::InterlockedIncrement(&uhx_tls_slot); } <|file_sep|>current/Haxe/Templates/Source/HaxeRuntime/Private/uhx/RuntimeLibrary.cpp #if defined(_MSC_VER) unreal::UIntPtr *uhx::ue::RuntimeLibrary_obj::tlsObj = nullptr; #elif defined(__GNUC__) thread_local unreal::UIntPtr *uhx::ue::RuntimeLibrary_obj::tlsObj = nullptr; #else static int uhx_tls_obj = FPlatformTLS::AllocTlsSlot(); unreal::UIntPtr uhx::ue::RuntimeLibrary_obj::getTlsObj() { unreal::UIntPtr *ret = (unreal::UIntPtr *) FPlatformTLS::GetTlsValue(uhx_tls_obj); if (!ret) { ret = (unreal::UIntPtr*) uhx::GcRef::createRoot(); FPlatformTLS::SetTlsValue(uhx_tls_obj, (void*) ret); return *ret = uhx::expose::HxcppRuntime::createArray(); } return *ret; } #endif int uhx::ue::RuntimeLibrary_obj::allocTlsSlot() { return FPlatformAtomics::InterlockedIncrement(&uhx_tls_slot); } <|file_sep|>updated/Haxe/Templates/Source/HaxeRuntime/Private/uhx/RuntimeLibrary.cpp
#elif defined(__GNUC__) thread_local unreal::UIntPtr *uhx::ue::RuntimeLibrary_obj::tlsObj = nullptr; #else static int uhx_tls_obj = FPlatformTLS::AllocTlsSlot(); unreal::UIntPtr uhx::ue::RuntimeLibrary_obj::getTlsObj() { unreal::UIntPtr *ret = (unreal::UIntPtr *) FPlatformTLS::GetTlsValue(uhx_tls_obj); if (!ret) { ret = (unreal::UIntPtr*) uhx::GcRef::createRoot(); FPlatformTLS::SetTlsValue(uhx_tls_obj, (void*) ret); return *ret = uhx::expose::HxcppRuntime::createArray(); } return *ret; } #endif int uhx::ue::RuntimeLibrary_obj::allocTlsSlot() { return FPlatformAtomics::InterlockedIncrement(&uhx_tls_slot); } #endif
Haxe/Templates/Source/HaxeRuntime/Private/uhx/RuntimeLibrary.cpp
C++
4a8ff4784d0bec8509435d1aa55d88c0c747d322
<|file_sep|>Haxe/Templates/Source/HaxeRuntime/Private/uhx/RuntimeLibrary.cpp.diff original: updated: #ifndef UHX_NO_UOBJECT <|file_sep|>original/Haxe/Templates/Source/HaxeRuntime/Private/uhx/RuntimeLibrary.cpp #if defined(_MSC_VER) unreal::UIntPtr *uhx::ue::RuntimeLibrary_obj::tlsObj = nullptr; #elif defined(__GNUC__) thread_local unreal::UIntPtr *uhx::ue::RuntimeLibrary_obj::tlsObj = nullptr; #else static int uhx_tls_obj = FPlatformTLS::AllocTlsSlot(); unreal::UIntPtr uhx::ue::RuntimeLibrary_obj::getTlsObj() { unreal::UIntPtr *ret = (unreal::UIntPtr *) FPlatformTLS::GetTlsValue(uhx_tls_obj); if (!ret) { ret = (unreal::UIntPtr*) uhx::GcRef::createRoot(); FPlatformTLS::SetTlsValue(uhx_tls_obj, (void*) ret); return *ret = uhx::expose::HxcppRuntime::createArray(); } return *ret; } #endif int uhx::ue::RuntimeLibrary_obj::allocTlsSlot() { return FPlatformAtomics::InterlockedIncrement(&uhx_tls_slot); } <|file_sep|>current/Haxe/Templates/Source/HaxeRuntime/Private/uhx/RuntimeLibrary.cpp #if defined(_MSC_VER) unreal::UIntPtr *uhx::ue::RuntimeLibrary_obj::tlsObj = nullptr; #elif defined(__GNUC__) thread_local unreal::UIntPtr *uhx::ue::RuntimeLibrary_obj::tlsObj = nullptr; #else static int uhx_tls_obj = FPlatformTLS::AllocTlsSlot(); unreal::UIntPtr uhx::ue::RuntimeLibrary_obj::getTlsObj() { unreal::UIntPtr *ret = (unreal::UIntPtr *) FPlatformTLS::GetTlsValue(uhx_tls_obj); if (!ret) { ret = (unreal::UIntPtr*) uhx::GcRef::createRoot(); FPlatformTLS::SetTlsValue(uhx_tls_obj, (void*) ret); return *ret = uhx::expose::HxcppRuntime::createArray(); } return *ret; } #endif int uhx::ue::RuntimeLibrary_obj::allocTlsSlot() { return FPlatformAtomics::InterlockedIncrement(&uhx_tls_slot); } <|file_sep|>updated/Haxe/Templates/Source/HaxeRuntime/Private/uhx/RuntimeLibrary.cpp #elif defined(__GNUC__) thread_local unreal::UIntPtr *uhx::ue::RuntimeLibrary_obj::tlsObj = nullptr; #else static int uhx_tls_obj = FPlatformTLS::AllocTlsSlot(); unreal::UIntPtr uhx::ue::RuntimeLibrary_obj::getTlsObj() { unreal::UIntPtr *ret = (unreal::UIntPtr *) FPlatformTLS::GetTlsValue(uhx_tls_obj); if (!ret) { ret = (unreal::UIntPtr*) uhx::GcRef::createRoot(); FPlatformTLS::SetTlsValue(uhx_tls_obj, (void*) ret); return *ret = uhx::expose::HxcppRuntime::createArray(); } return *ret; } #endif int uhx::ue::RuntimeLibrary_obj::allocTlsSlot() { return FPlatformAtomics::InterlockedIncrement(&uhx_tls_slot); } #endif
<|file_sep|>cpp/util/testing.cc.diff original: updated: #include <event2/thread.h> <|file_sep|>original/cpp/util/testing.cc #include <gflags/gflags.h> #include <glog/logging.h> #include <gtest/gtest.h> namespace cert_trans { namespace test { void InitTesting(const char* name, int* argc, char*** argv, bool remove_flags) { // Change the defaults. Can be overridden on command line. // Log to stderr instead of log files. FLAGS_logtostderr = true; // Only log fatal messages by default. FLAGS_minloglevel = 3; ::testing::InitGoogleTest(argc, *argv); google::ParseCommandLineFlags(argc, argv, remove_flags); google::InitGoogleLogging(name); } } // namespace test } // namespace cert_trans <|file_sep|>current/cpp/util/testing.cc #include <gflags/gflags.h> #include <glog/logging.h> #include <gtest/gtest.h> namespace cert_trans { namespace test { void InitTesting(const char* name, int* argc, char*** argv, bool remove_flags) { // Change the defaults. Can be overridden on command line. // Log to stderr instead of log files. FLAGS_logtostderr = true; // Only log fatal messages by default. FLAGS_minloglevel = 3; ::testing::InitGoogleTest(argc, *argv); google::ParseCommandLineFlags(argc, argv, remove_flags); google::InitGoogleLogging(name); } } // namespace test } // namespace cert_trans <|file_sep|>updated/cpp/util/testing.cc
#include <glog/logging.h> #include <gtest/gtest.h> namespace cert_trans { namespace test { void InitTesting(const char* name, int* argc, char*** argv, bool remove_flags) { // Change the defaults. Can be overridden on command line. // Log to stderr instead of log files. FLAGS_logtostderr = true; // Only log fatal messages by default. FLAGS_minloglevel = 3; ::testing::InitGoogleTest(argc, *argv); google::ParseCommandLineFlags(argc, argv, remove_flags); google::InitGoogleLogging(name); evthread_use_pthreads(); } } // namespace test } // namespace cert_trans
cpp/util/testing.cc
C++
38e4b97e6a646aa8c333956de9a7570868ed22eb
<|file_sep|>cpp/util/testing.cc.diff original: updated: #include <event2/thread.h> <|file_sep|>original/cpp/util/testing.cc #include <gflags/gflags.h> #include <glog/logging.h> #include <gtest/gtest.h> namespace cert_trans { namespace test { void InitTesting(const char* name, int* argc, char*** argv, bool remove_flags) { // Change the defaults. Can be overridden on command line. // Log to stderr instead of log files. FLAGS_logtostderr = true; // Only log fatal messages by default. FLAGS_minloglevel = 3; ::testing::InitGoogleTest(argc, *argv); google::ParseCommandLineFlags(argc, argv, remove_flags); google::InitGoogleLogging(name); } } // namespace test } // namespace cert_trans <|file_sep|>current/cpp/util/testing.cc #include <gflags/gflags.h> #include <glog/logging.h> #include <gtest/gtest.h> namespace cert_trans { namespace test { void InitTesting(const char* name, int* argc, char*** argv, bool remove_flags) { // Change the defaults. Can be overridden on command line. // Log to stderr instead of log files. FLAGS_logtostderr = true; // Only log fatal messages by default. FLAGS_minloglevel = 3; ::testing::InitGoogleTest(argc, *argv); google::ParseCommandLineFlags(argc, argv, remove_flags); google::InitGoogleLogging(name); } } // namespace test } // namespace cert_trans <|file_sep|>updated/cpp/util/testing.cc #include <glog/logging.h> #include <gtest/gtest.h> namespace cert_trans { namespace test { void InitTesting(const char* name, int* argc, char*** argv, bool remove_flags) { // Change the defaults. Can be overridden on command line. // Log to stderr instead of log files. FLAGS_logtostderr = true; // Only log fatal messages by default. FLAGS_minloglevel = 3; ::testing::InitGoogleTest(argc, *argv); google::ParseCommandLineFlags(argc, argv, remove_flags); google::InitGoogleLogging(name); evthread_use_pthreads(); } } // namespace test } // namespace cert_trans
<|file_sep|>src/nwg_service.cc.diff original: updated: #include "nwg_basicprotocolcodec.h" <|file_sep|>original/src/nwg_service.cc void Service::setHandler(const std::shared_ptr<Handler> &handler) { _handler = handler; } EventLoop *Service::getEventLoop() const { return _eventLoop; } size_t Service::getBuffSize() { return _buffSize; } size_t Service::getReadBuffSize() { return _readBuffSize; } ProtocolCodec &Service::getProtocolCodec() { return *_protocolCodec; } Handler &Service::getHandler() { return *_handler; } } /* namespace Nwg */ <|file_sep|>current/src/nwg_service.cc void Service::setHandler(const std::shared_ptr<Handler> &handler) { _handler = handler; } EventLoop *Service::getEventLoop() const { return _eventLoop; } size_t Service::getBuffSize() { return _buffSize; } size_t Service::getReadBuffSize() { return _readBuffSize; } ProtocolCodec &Service::getProtocolCodec() { return *_protocolCodec; } Handler &Service::getHandler() { return *_handler; } } /* namespace Nwg */ <|file_sep|>updated/src/nwg_service.cc
} EventLoop *Service::getEventLoop() const { return _eventLoop; } size_t Service::getBuffSize() { return _buffSize; } size_t Service::getReadBuffSize() { return _readBuffSize; } ProtocolCodec &Service::getProtocolCodec() { if (_protocolCodec == nullptr) { _protocolCodec = std::make_shared<Nwg::BasicProtocolCodec>(); } return *_protocolCodec; } Handler &Service::getHandler() { return *_handler; } } /* namespace Nwg */
src/nwg_service.cc
C++
0169c849d903c80edd36ba6f73e18f1a5d9e7a3e
<|file_sep|>src/nwg_service.cc.diff original: updated: #include "nwg_basicprotocolcodec.h" <|file_sep|>original/src/nwg_service.cc void Service::setHandler(const std::shared_ptr<Handler> &handler) { _handler = handler; } EventLoop *Service::getEventLoop() const { return _eventLoop; } size_t Service::getBuffSize() { return _buffSize; } size_t Service::getReadBuffSize() { return _readBuffSize; } ProtocolCodec &Service::getProtocolCodec() { return *_protocolCodec; } Handler &Service::getHandler() { return *_handler; } } /* namespace Nwg */ <|file_sep|>current/src/nwg_service.cc void Service::setHandler(const std::shared_ptr<Handler> &handler) { _handler = handler; } EventLoop *Service::getEventLoop() const { return _eventLoop; } size_t Service::getBuffSize() { return _buffSize; } size_t Service::getReadBuffSize() { return _readBuffSize; } ProtocolCodec &Service::getProtocolCodec() { return *_protocolCodec; } Handler &Service::getHandler() { return *_handler; } } /* namespace Nwg */ <|file_sep|>updated/src/nwg_service.cc } EventLoop *Service::getEventLoop() const { return _eventLoop; } size_t Service::getBuffSize() { return _buffSize; } size_t Service::getReadBuffSize() { return _readBuffSize; } ProtocolCodec &Service::getProtocolCodec() { if (_protocolCodec == nullptr) { _protocolCodec = std::make_shared<Nwg::BasicProtocolCodec>(); } return *_protocolCodec; } Handler &Service::getHandler() { return *_handler; } } /* namespace Nwg */
<|file_sep|>tests/themispp/main.cpp.diff original: updated: #include "secure_comparator_test.hpp" <|file_sep|>original/tests/themispp/main.cpp * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include <common/sput.h> #include "secure_cell_test.hpp" #include "secure_message_test.hpp" #include "secure_session_test.hpp" int main(){ sput_start_testing(); themispp::secure_cell_test::run_secure_cell_test(); themispp::secure_message_test::run_secure_message_test(); themispp::secure_session_test::run_secure_session_test(); sput_finish_testing(); return sput_get_return_value(); } <|file_sep|>current/tests/themispp/main.cpp * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include <common/sput.h> #include "secure_cell_test.hpp" #include "secure_message_test.hpp" #include "secure_session_test.hpp" #include "secure_comparator_test.hpp" int main(){ sput_start_testing(); themispp::secure_cell_test::run_secure_cell_test(); themispp::secure_message_test::run_secure_message_test(); themispp::secure_session_test::run_secure_session_test(); sput_finish_testing(); return sput_get_return_value(); } <|file_sep|>updated/tests/themispp/main.cpp
* See the License for the specific language governing permissions and * limitations under the License. */ #include <common/sput.h> #include "secure_cell_test.hpp" #include "secure_message_test.hpp" #include "secure_session_test.hpp" #include "secure_comparator_test.hpp" int main(){ sput_start_testing(); themispp::secure_cell_test::run_secure_cell_test(); themispp::secure_message_test::run_secure_message_test(); themispp::secure_session_test::run_secure_session_test(); themispp::secure_session_test::run_secure_comparator_test(); sput_finish_testing(); return sput_get_return_value(); }
tests/themispp/main.cpp
C++
31da751ab34c40a065f172d2c05d50bc717e92a7
<|file_sep|>tests/themispp/main.cpp.diff original: updated: #include "secure_comparator_test.hpp" <|file_sep|>original/tests/themispp/main.cpp * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include <common/sput.h> #include "secure_cell_test.hpp" #include "secure_message_test.hpp" #include "secure_session_test.hpp" int main(){ sput_start_testing(); themispp::secure_cell_test::run_secure_cell_test(); themispp::secure_message_test::run_secure_message_test(); themispp::secure_session_test::run_secure_session_test(); sput_finish_testing(); return sput_get_return_value(); } <|file_sep|>current/tests/themispp/main.cpp * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include <common/sput.h> #include "secure_cell_test.hpp" #include "secure_message_test.hpp" #include "secure_session_test.hpp" #include "secure_comparator_test.hpp" int main(){ sput_start_testing(); themispp::secure_cell_test::run_secure_cell_test(); themispp::secure_message_test::run_secure_message_test(); themispp::secure_session_test::run_secure_session_test(); sput_finish_testing(); return sput_get_return_value(); } <|file_sep|>updated/tests/themispp/main.cpp * See the License for the specific language governing permissions and * limitations under the License. */ #include <common/sput.h> #include "secure_cell_test.hpp" #include "secure_message_test.hpp" #include "secure_session_test.hpp" #include "secure_comparator_test.hpp" int main(){ sput_start_testing(); themispp::secure_cell_test::run_secure_cell_test(); themispp::secure_message_test::run_secure_message_test(); themispp::secure_session_test::run_secure_session_test(); themispp::secure_session_test::run_secure_comparator_test(); sput_finish_testing(); return sput_get_return_value(); }
<|file_sep|>test/t/basic/runtest.cpp.diff original: updated: REQUIRE(!item); // test operator bool() <|file_sep|>original/test/t/basic/runtest.cpp SECTION("empty buffer is okay") { std::string buffer; mapbox::util::pbf item(buffer.data(), 0); REQUIRE(!item.next()); } SECTION("check every possible value for single byte in buffer") { char buffer[1]; for (int i = 0; i <= 255; ++i) { *buffer = static_cast<char>(i); mapbox::util::pbf item(buffer, 1); REQUIRE_THROWS({ item.next(); item.skip(); }); } } } <|file_sep|>current/test/t/basic/runtest.cpp std::string buffer; mapbox::util::pbf item(buffer.data(), 0); REQUIRE(!item); // test operator bool() REQUIRE(!item.next()); } SECTION("check every possible value for single byte in buffer") { char buffer[1]; for (int i = 0; i <= 255; ++i) { *buffer = static_cast<char>(i); mapbox::util::pbf item(buffer, 1); REQUIRE_THROWS({ item.next(); item.skip(); }); } } } <|file_sep|>updated/test/t/basic/runtest.cpp
mapbox::util::pbf item(buffer.data(), 0); REQUIRE(!item); // test operator bool() REQUIRE(!item.next()); } SECTION("check every possible value for single byte in buffer") { char buffer[1]; for (int i = 0; i <= 255; ++i) { *buffer = static_cast<char>(i); mapbox::util::pbf item(buffer, 1); REQUIRE(!!item); // test operator bool() REQUIRE_THROWS({ item.next(); item.skip(); }); } } }
test/t/basic/runtest.cpp
C++
250cac0ecbb56e5ead8dd05fe1094bd9bc2efacb
<|file_sep|>test/t/basic/runtest.cpp.diff original: updated: REQUIRE(!item); // test operator bool() <|file_sep|>original/test/t/basic/runtest.cpp SECTION("empty buffer is okay") { std::string buffer; mapbox::util::pbf item(buffer.data(), 0); REQUIRE(!item.next()); } SECTION("check every possible value for single byte in buffer") { char buffer[1]; for (int i = 0; i <= 255; ++i) { *buffer = static_cast<char>(i); mapbox::util::pbf item(buffer, 1); REQUIRE_THROWS({ item.next(); item.skip(); }); } } } <|file_sep|>current/test/t/basic/runtest.cpp std::string buffer; mapbox::util::pbf item(buffer.data(), 0); REQUIRE(!item); // test operator bool() REQUIRE(!item.next()); } SECTION("check every possible value for single byte in buffer") { char buffer[1]; for (int i = 0; i <= 255; ++i) { *buffer = static_cast<char>(i); mapbox::util::pbf item(buffer, 1); REQUIRE_THROWS({ item.next(); item.skip(); }); } } } <|file_sep|>updated/test/t/basic/runtest.cpp mapbox::util::pbf item(buffer.data(), 0); REQUIRE(!item); // test operator bool() REQUIRE(!item.next()); } SECTION("check every possible value for single byte in buffer") { char buffer[1]; for (int i = 0; i <= 255; ++i) { *buffer = static_cast<char>(i); mapbox::util::pbf item(buffer, 1); REQUIRE(!!item); // test operator bool() REQUIRE_THROWS({ item.next(); item.skip(); }); } } }
<|file_sep|>tests/test_lua.cpp.diff original: updated: #include <QCoreApplication> <|file_sep|>original/tests/test_lua.cpp #include "Rainback.hpp" #include <lua-cxx/LuaEnvironment.hpp> #include <lua-cxx/LuaValue.hpp> #include <QFile> int main(int argc, char* argv[]) { Lua lua; rainback::Rainback rainback(lua); std::string srcdir(getenv("srcdir")); QFile testRunner(QString(srcdir.c_str()) + "/test_lua.lua"); return (bool)lua(testRunner) ? 0 : 1; } <|file_sep|>current/tests/test_lua.cpp #include "Rainback.hpp" #include <lua-cxx/LuaEnvironment.hpp> #include <lua-cxx/LuaValue.hpp> #include <QFile> #include <QCoreApplication> int main(int argc, char* argv[]) { Lua lua; rainback::Rainback rainback(lua); std::string srcdir(getenv("srcdir")); QFile testRunner(QString(srcdir.c_str()) + "/test_lua.lua"); return (bool)lua(testRunner) ? 0 : 1; } <|file_sep|>updated/tests/test_lua.cpp
#include "Rainback.hpp" #include <lua-cxx/LuaEnvironment.hpp> #include <lua-cxx/LuaValue.hpp> #include <QFile> #include <QCoreApplication> int main(int argc, char* argv[]) { QCoreApplication app(argc, argv); Lua lua; rainback::Rainback rainback(lua); std::string srcdir(getenv("srcdir")); QFile testRunner(QString(srcdir.c_str()) + "/test_lua.lua"); return (bool)lua(testRunner) ? 0 : 1; }
tests/test_lua.cpp
C++
3a7d7381dd7dca6bbc9d5fd48d2227cb18e2ede8
<|file_sep|>tests/test_lua.cpp.diff original: updated: #include <QCoreApplication> <|file_sep|>original/tests/test_lua.cpp #include "Rainback.hpp" #include <lua-cxx/LuaEnvironment.hpp> #include <lua-cxx/LuaValue.hpp> #include <QFile> int main(int argc, char* argv[]) { Lua lua; rainback::Rainback rainback(lua); std::string srcdir(getenv("srcdir")); QFile testRunner(QString(srcdir.c_str()) + "/test_lua.lua"); return (bool)lua(testRunner) ? 0 : 1; } <|file_sep|>current/tests/test_lua.cpp #include "Rainback.hpp" #include <lua-cxx/LuaEnvironment.hpp> #include <lua-cxx/LuaValue.hpp> #include <QFile> #include <QCoreApplication> int main(int argc, char* argv[]) { Lua lua; rainback::Rainback rainback(lua); std::string srcdir(getenv("srcdir")); QFile testRunner(QString(srcdir.c_str()) + "/test_lua.lua"); return (bool)lua(testRunner) ? 0 : 1; } <|file_sep|>updated/tests/test_lua.cpp #include "Rainback.hpp" #include <lua-cxx/LuaEnvironment.hpp> #include <lua-cxx/LuaValue.hpp> #include <QFile> #include <QCoreApplication> int main(int argc, char* argv[]) { QCoreApplication app(argc, argv); Lua lua; rainback::Rainback rainback(lua); std::string srcdir(getenv("srcdir")); QFile testRunner(QString(srcdir.c_str()) + "/test_lua.lua"); return (bool)lua(testRunner) ? 0 : 1; }
<|file_sep|>sdk-remote/src/libuco/urbi-main.cc.diff original: updated: libport::program_initialize(argc, const_cast<char**>(argv)); <|file_sep|>sdk-remote/src/libuco/urbi-main.cc.diff original: updated: libport::program_initialize(args); <|file_sep|>original/sdk-remote/src/libuco/urbi-main.cc int urbi_main_args(const libport::cli_args_type& args, bool block, bool errors) { return urbi::main(args, block, errors); } } namespace urbi { int main(int argc, const char* argv[], bool block, bool errors) { libport::cli_args_type args; // For some reason, I failed to use std::copy here. for (int i = 0; i < argc; ++i) args << std::string(argv[i]); return main(args, block, errors); } } <|file_sep|>current/sdk-remote/src/libuco/urbi-main.cc { libport::program_initialize(args); return urbi::main(args, block, errors); } } namespace urbi { int main(int argc, const char* argv[], bool block, bool errors) { libport::cli_args_type args; // For some reason, I failed to use std::copy here. for (int i = 0; i < argc; ++i) args << std::string(argv[i]); return main(args, block, errors); } } <|file_sep|>updated/sdk-remote/src/libuco/urbi-main.cc
return urbi::main(args, block, errors); } } namespace urbi { int main(int argc, const char* argv[], bool block, bool errors) { libport::program_initialize(argc, const_cast<char**>(argv)); libport::cli_args_type args; // For some reason, I failed to use std::copy here. for (int i = 0; i < argc; ++i) args << std::string(argv[i]); return main(args, block, errors); } }
sdk-remote/src/libuco/urbi-main.cc
C++
d191a42d6e36abb1c5ad46c948f8cd92063f7eec
<|file_sep|>sdk-remote/src/libuco/urbi-main.cc.diff original: updated: libport::program_initialize(argc, const_cast<char**>(argv)); <|file_sep|>sdk-remote/src/libuco/urbi-main.cc.diff original: updated: libport::program_initialize(args); <|file_sep|>original/sdk-remote/src/libuco/urbi-main.cc int urbi_main_args(const libport::cli_args_type& args, bool block, bool errors) { return urbi::main(args, block, errors); } } namespace urbi { int main(int argc, const char* argv[], bool block, bool errors) { libport::cli_args_type args; // For some reason, I failed to use std::copy here. for (int i = 0; i < argc; ++i) args << std::string(argv[i]); return main(args, block, errors); } } <|file_sep|>current/sdk-remote/src/libuco/urbi-main.cc { libport::program_initialize(args); return urbi::main(args, block, errors); } } namespace urbi { int main(int argc, const char* argv[], bool block, bool errors) { libport::cli_args_type args; // For some reason, I failed to use std::copy here. for (int i = 0; i < argc; ++i) args << std::string(argv[i]); return main(args, block, errors); } } <|file_sep|>updated/sdk-remote/src/libuco/urbi-main.cc return urbi::main(args, block, errors); } } namespace urbi { int main(int argc, const char* argv[], bool block, bool errors) { libport::program_initialize(argc, const_cast<char**>(argv)); libport::cli_args_type args; // For some reason, I failed to use std::copy here. for (int i = 0; i < argc; ++i) args << std::string(argv[i]); return main(args, block, errors); } }
<|file_sep|>src/test/fuzz/parse_hd_keypath.cpp.diff original: updated: #include <test/fuzz/FuzzedDataProvider.h> <|file_sep|>src/test/fuzz/parse_hd_keypath.cpp.diff original: updated: #include <test/fuzz/util.h> <|file_sep|>src/test/fuzz/parse_hd_keypath.cpp.diff original: updated: #include <cstdint> #include <vector> <|file_sep|>original/src/test/fuzz/parse_hd_keypath.cpp // Copyright (c) 2009-2019 The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include <test/fuzz/fuzz.h> #include <util/bip32.h> void test_one_input(const std::vector<uint8_t>& buffer) { const std::string keypath_str(buffer.begin(), buffer.end()); std::vector<uint32_t> keypath; (void)ParseHDKeypath(keypath_str, keypath); } <|file_sep|>current/src/test/fuzz/parse_hd_keypath.cpp // Copyright (c) 2009-2019 The Bitcoin Core developers // 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/bip32.h> #include <cstdint> #include <vector> void test_one_input(const std::vector<uint8_t>& buffer) { const std::string keypath_str(buffer.begin(), buffer.end()); std::vector<uint32_t> keypath; (void)ParseHDKeypath(keypath_str, keypath); } <|file_sep|>updated/src/test/fuzz/parse_hd_keypath.cpp
// 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/bip32.h> #include <cstdint> #include <vector> void test_one_input(const std::vector<uint8_t>& buffer) { const std::string keypath_str(buffer.begin(), buffer.end()); std::vector<uint32_t> keypath; (void)ParseHDKeypath(keypath_str, keypath); FuzzedDataProvider fuzzed_data_provider(buffer.data(), buffer.size()); const std::vector<uint32_t> random_keypath = ConsumeRandomLengthIntegralVector<uint32_t>(fuzzed_data_provider); (void)FormatHDKeypath(random_keypath); (void)WriteHDKeypath(random_keypath); }
src/test/fuzz/parse_hd_keypath.cpp
C++
1532259fcae8712777e1cedefc91224ee60a6aaa
<|file_sep|>src/test/fuzz/parse_hd_keypath.cpp.diff original: updated: #include <test/fuzz/FuzzedDataProvider.h> <|file_sep|>src/test/fuzz/parse_hd_keypath.cpp.diff original: updated: #include <test/fuzz/util.h> <|file_sep|>src/test/fuzz/parse_hd_keypath.cpp.diff original: updated: #include <cstdint> #include <vector> <|file_sep|>original/src/test/fuzz/parse_hd_keypath.cpp // Copyright (c) 2009-2019 The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include <test/fuzz/fuzz.h> #include <util/bip32.h> void test_one_input(const std::vector<uint8_t>& buffer) { const std::string keypath_str(buffer.begin(), buffer.end()); std::vector<uint32_t> keypath; (void)ParseHDKeypath(keypath_str, keypath); } <|file_sep|>current/src/test/fuzz/parse_hd_keypath.cpp // Copyright (c) 2009-2019 The Bitcoin Core developers // 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/bip32.h> #include <cstdint> #include <vector> void test_one_input(const std::vector<uint8_t>& buffer) { const std::string keypath_str(buffer.begin(), buffer.end()); std::vector<uint32_t> keypath; (void)ParseHDKeypath(keypath_str, keypath); } <|file_sep|>updated/src/test/fuzz/parse_hd_keypath.cpp // 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/bip32.h> #include <cstdint> #include <vector> void test_one_input(const std::vector<uint8_t>& buffer) { const std::string keypath_str(buffer.begin(), buffer.end()); std::vector<uint32_t> keypath; (void)ParseHDKeypath(keypath_str, keypath); FuzzedDataProvider fuzzed_data_provider(buffer.data(), buffer.size()); const std::vector<uint32_t> random_keypath = ConsumeRandomLengthIntegralVector<uint32_t>(fuzzed_data_provider); (void)FormatHDKeypath(random_keypath); (void)WriteHDKeypath(random_keypath); }
<|file_sep|>src/server/views/helpers.cpp.diff original: updated: JsonInt i = JsonInt(errorcode); <|file_sep|>original/src/server/views/helpers.cpp #include "helpers.h" using namespace std; void sendFail(UserHandler * handler, int errorcode, string topic, string message){ JsonDict answer; JsonBool b = JsonBool(false); JsonString s = JsonString(message); answer.add("success", &b); answer.add("reason", &s); handler->writeToClient(topic, &answer); } <|file_sep|>current/src/server/views/helpers.cpp #include "helpers.h" using namespace std; void sendFail(UserHandler * handler, int errorcode, string topic, string message){ JsonDict answer; JsonBool b = JsonBool(false); JsonString s = JsonString(message); JsonInt i = JsonInt(errorcode); answer.add("success", &b); answer.add("reason", &s); handler->writeToClient(topic, &answer); } <|file_sep|>updated/src/server/views/helpers.cpp
#include "helpers.h" using namespace std; void sendFail(UserHandler * handler, int errorcode, string topic, string message){ JsonDict answer; JsonBool b = JsonBool(false); JsonString s = JsonString(message); JsonInt i = JsonInt(errorcode); answer.add("success", &b); answer.add("reason", &s); answer.add("code", &i); handler->writeToClient(topic, &answer); }
src/server/views/helpers.cpp
C++
100e09d11e770ae604baf678cb009c4b0c9bd2c4
<|file_sep|>src/server/views/helpers.cpp.diff original: updated: JsonInt i = JsonInt(errorcode); <|file_sep|>original/src/server/views/helpers.cpp #include "helpers.h" using namespace std; void sendFail(UserHandler * handler, int errorcode, string topic, string message){ JsonDict answer; JsonBool b = JsonBool(false); JsonString s = JsonString(message); answer.add("success", &b); answer.add("reason", &s); handler->writeToClient(topic, &answer); } <|file_sep|>current/src/server/views/helpers.cpp #include "helpers.h" using namespace std; void sendFail(UserHandler * handler, int errorcode, string topic, string message){ JsonDict answer; JsonBool b = JsonBool(false); JsonString s = JsonString(message); JsonInt i = JsonInt(errorcode); answer.add("success", &b); answer.add("reason", &s); handler->writeToClient(topic, &answer); } <|file_sep|>updated/src/server/views/helpers.cpp #include "helpers.h" using namespace std; void sendFail(UserHandler * handler, int errorcode, string topic, string message){ JsonDict answer; JsonBool b = JsonBool(false); JsonString s = JsonString(message); JsonInt i = JsonInt(errorcode); answer.add("success", &b); answer.add("reason", &s); answer.add("code", &i); handler->writeToClient(topic, &answer); }
<|file_sep|>src/allocators/global_sbrk_allocator.cc.diff original: updated: #ifdef __x86_64__ <|file_sep|>original/src/allocators/global_sbrk_allocator.cc // Copyright (c) 2012-2013, the scalloc Project Authors. All rights reserved. // Please see the AUTHORS file for details. Use of this source code is governed // by a BSD license that can be found in the LICENSE file. #include "allocators/global_sbrk_allocator.h" #include <sys/mman.h> // mmap #include "log.h" uintptr_t GlobalSbrkAllocator::current_; void GlobalSbrkAllocator::InitModule() { size_t size = 1UL << 35; // 32GiB void* p = mmap(0, size, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); if (p == MAP_FAILED) { ErrorOut("mmap failed"); } current_ = reinterpret_cast<uintptr_t>(p); } <|file_sep|>current/src/allocators/global_sbrk_allocator.cc // Copyright (c) 2012-2013, the scalloc Project Authors. All rights reserved. // Please see the AUTHORS file for details. Use of this source code is governed // by a BSD license that can be found in the LICENSE file. #include "allocators/global_sbrk_allocator.h" #include <sys/mman.h> // mmap #include "log.h" uintptr_t GlobalSbrkAllocator::current_; void GlobalSbrkAllocator::InitModule() { #ifdef __x86_64__ size_t size = 1UL << 35; // 32GiB void* p = mmap(0, size, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); if (p == MAP_FAILED) { ErrorOut("mmap failed"); } current_ = reinterpret_cast<uintptr_t>(p); } <|file_sep|>updated/src/allocators/global_sbrk_allocator.cc
#include <sys/mman.h> // mmap #include "log.h" uintptr_t GlobalSbrkAllocator::current_; void GlobalSbrkAllocator::InitModule() { #ifdef __x86_64__ size_t size = 1UL << 35; // 32GiB #endif #ifdef __i386__ size_t size = 1UL << 31; #endif void* p = mmap(0, size, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); if (p == MAP_FAILED) { ErrorOut("mmap failed"); } current_ = reinterpret_cast<uintptr_t>(p); }
src/allocators/global_sbrk_allocator.cc
C++
29b75635d99a4b02079dd4c683e8c9ea71e98fd2
<|file_sep|>src/allocators/global_sbrk_allocator.cc.diff original: updated: #ifdef __x86_64__ <|file_sep|>original/src/allocators/global_sbrk_allocator.cc // Copyright (c) 2012-2013, the scalloc Project Authors. All rights reserved. // Please see the AUTHORS file for details. Use of this source code is governed // by a BSD license that can be found in the LICENSE file. #include "allocators/global_sbrk_allocator.h" #include <sys/mman.h> // mmap #include "log.h" uintptr_t GlobalSbrkAllocator::current_; void GlobalSbrkAllocator::InitModule() { size_t size = 1UL << 35; // 32GiB void* p = mmap(0, size, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); if (p == MAP_FAILED) { ErrorOut("mmap failed"); } current_ = reinterpret_cast<uintptr_t>(p); } <|file_sep|>current/src/allocators/global_sbrk_allocator.cc // Copyright (c) 2012-2013, the scalloc Project Authors. All rights reserved. // Please see the AUTHORS file for details. Use of this source code is governed // by a BSD license that can be found in the LICENSE file. #include "allocators/global_sbrk_allocator.h" #include <sys/mman.h> // mmap #include "log.h" uintptr_t GlobalSbrkAllocator::current_; void GlobalSbrkAllocator::InitModule() { #ifdef __x86_64__ size_t size = 1UL << 35; // 32GiB void* p = mmap(0, size, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); if (p == MAP_FAILED) { ErrorOut("mmap failed"); } current_ = reinterpret_cast<uintptr_t>(p); } <|file_sep|>updated/src/allocators/global_sbrk_allocator.cc #include <sys/mman.h> // mmap #include "log.h" uintptr_t GlobalSbrkAllocator::current_; void GlobalSbrkAllocator::InitModule() { #ifdef __x86_64__ size_t size = 1UL << 35; // 32GiB #endif #ifdef __i386__ size_t size = 1UL << 31; #endif void* p = mmap(0, size, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); if (p == MAP_FAILED) { ErrorOut("mmap failed"); } current_ = reinterpret_cast<uintptr_t>(p); }