commit stringlengths 40 40 | old_file stringlengths 4 264 | new_file stringlengths 4 264 | old_contents stringlengths 0 4.24k | new_contents stringlengths 1 5.44k | subject stringlengths 14 778 | message stringlengths 15 9.92k | lang stringclasses 277
values | license stringclasses 13
values | repos stringlengths 5 127k |
|---|---|---|---|---|---|---|---|---|---|
4236c652b3d581ce8b6851efd4653cb815c4ac70 | test/correctness/thread_safety.cpp | test/correctness/thread_safety.cpp | #include "Halide.h"
#include <stdio.h>
#include <thread>
using namespace Halide;
int main(int argc, char **argv) {
// Test if the compiler itself is thread-safe. This test is
// intended to be run in a thread-sanitizer.
std::vector<std::thread> threads;
for (int i = 0; i < 1000; i++) {
threads... | #include "Halide.h"
#include <stdio.h>
#include <future>
using namespace Halide;
static std::atomic<int> foo;
int main(int argc, char **argv) {
// Test if the compiler itself is thread-safe. This test is
// intended to be run in a thread-sanitizer.
std::vector<std::future<void>> futures;
for (int i =... | Use std::async() instead of std::thread() | Use std::async() instead of std::thread()
It is guaranteed to use a pool-like behavior; to ensure that every task
is executed by spawning a new thread, we must explicitly specify
std::launch::async.
| C++ | mit | psuriana/Halide,psuriana/Halide,psuriana/Halide,kgnk/Halide,psuriana/Halide,kgnk/Halide,kgnk/Halide,kgnk/Halide,psuriana/Halide,psuriana/Halide,kgnk/Halide,psuriana/Halide,kgnk/Halide,kgnk/Halide,kgnk/Halide |
ea3fee315f385cbdb4885cc3fab47eff9b100ebc | tyqt/database.cc | tyqt/database.cc | /*
* ty, a collection of GUI and command-line tools to manage Teensy devices
*
* Distributed under the MIT license (see LICENSE.txt or http://opensource.org/licenses/MIT)
* Copyright (c) 2015 Niels Martignène <niels.martignene@gmail.com>
*/
#include <QSettings>
#include "database.hh"
using namespace std;
void ... | /*
* ty, a collection of GUI and command-line tools to manage Teensy devices
*
* Distributed under the MIT license (see LICENSE.txt or http://opensource.org/licenses/MIT)
* Copyright (c) 2015 Niels Martignène <niels.martignene@gmail.com>
*/
#include <QSettings>
#include "database.hh"
using namespace std;
void ... | Remove 'useless' checks from SettingsDatabase | Remove 'useless' checks from SettingsDatabase
| C++ | unlicense | Koromix/tytools,Koromix/tytools,Koromix/ty,Koromix/ty,Koromix/ty,Koromix/tytools |
1a29dba560ca40ae94570a98a1ddadfeedcb8a55 | MainWindow.cpp | MainWindow.cpp | #include "MainWindow.h"
#include <Application.h>
#include <Menu.h>
#include <MenuItem.h>
#include <View.h>
#include "MainView.h"
MainWindow::MainWindow(void)
: BWindow(BRect(100,100,500,400),"Font Demo", B_TITLED_WINDOW,
B_ASYNCHRONOUS_CONTROLS)
{
BRect r(Bounds());
r.bottom = 20;
fMenuBar = new BMenuBar... | #include "MainWindow.h"
#include <Application.h>
#include <Menu.h>
#include <MenuItem.h>
#include <View.h>
#include "MainView.h"
MainWindow::MainWindow(void)
: BWindow(BRect(100, 100, 900, 550),"Font Demo", B_TITLED_WINDOW,
B_ASYNCHRONOUS_CONTROLS)
{
BRect r(Bounds());
r.bottom = 20;
fMenuBar = new BMenu... | Make the initial window size larger to see all text | Make the initial window size larger to see all text
| C++ | mit | digib0y/DemoHarfbuzzApp |
7191b517c6ede284a680a9ef330b1fee076a2a9b | cc/blink/web_external_bitmap_impl.cc | cc/blink/web_external_bitmap_impl.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 "cc/blink/web_external_bitmap_impl.h"
#include "cc/resources/shared_bitmap.h"
namespace cc_blink {
namespace {
SharedBitmapAllocationFunction... | // 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 "cc/blink/web_external_bitmap_impl.h"
#include "cc/resources/shared_bitmap.h"
namespace cc_blink {
namespace {
SharedBitmapAllocationFunction... | Add null check in WebExternalBitmapImpl::pixels. | Add null check in WebExternalBitmapImpl::pixels.
This should work around problems with zero-sized canvases.
BUG=520417
CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel
Review URL: https://codereview.chromium.org/1325783008
Cr-Commit-Position: 972c6d2dc6dd5efdad1377c0d224e03eb8f276f7@{#348043}
| C++ | bsd-3-clause | CapOM/ChromiumGStreamerBackend,CapOM/ChromiumGStreamerBackend,CapOM/ChromiumGStreamerBackend,ltilve/ChromiumGStreamerBackend,ltilve/ChromiumGStreamerBackend,CapOM/ChromiumGStreamerBackend,CapOM/ChromiumGStreamerBackend,ltilve/ChromiumGStreamerBackend,ltilve/ChromiumGStreamerBackend,ltilve/ChromiumGStreamerBackend,ltilv... |
fae861b25df7e99d1b1e17265d613e32e19b79da | third_party/tcmalloc/win_allocator.cc | third_party/tcmalloc/win_allocator.cc | // Copyright (c) 2009 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.
// This is a simple allocator based on the windows heap.
extern "C" {
HANDLE win_heap;
bool win_heap_init(bool use_lfh) {
win_heap = HeapCreate(0... | // Copyright (c) 2009 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.
// This is a simple allocator based on the windows heap.
extern "C" {
HANDLE win_heap;
bool win_heap_init(bool use_lfh) {
win_heap = HeapCreate(0... | Fix the windows allocator to behave properly on realloc. | Fix the windows allocator to behave properly on realloc.
The spec says that calling realloc(ptr, 0) should free ptr
and return NULL.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/196041
git-svn-id: dd90618784b6a4b323ea0c23a071cb1c9e6f2ac7@25612 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
| C++ | bsd-3-clause | wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser |
4574eb5493523a07ab082b4ed154de365139116d | src/yugong.cpp | src/yugong.cpp | #include "yugong.hpp"
#include <cstdint>
#include <cstdlib>
namespace yg {
void YGStack::alloc(YGStack &stack, uintptr_t size) {
void *mem = std::malloc(size);
uintptr_t start = (uintptr_t)mem;
stack.start = start;
stack.size = size;
stack.sp = start + size;
}
vo... | #include "yugong.hpp"
#include <cstdint>
#include <cstdlib>
namespace yg {
void YGStack::alloc(YGStack &stack, uintptr_t size) {
void *mem = std::malloc(size);
uintptr_t start = reinterpret_cast<uintptr_t>(mem);
stack.start = start;
stack.size = size;
stack.sp = start + s... | Use C++-style reinterpret_cast when possible. | Use C++-style reinterpret_cast when possible.
| C++ | mit | microvm/libyugong,microvm/libyugong |
4774961e8f3a735b27bc679501891d593488ba78 | tests/main.cpp | tests/main.cpp | #define BOOST_TEST_MODULE rainback
#include "init.hpp"
#include <QApplication>
struct QApplicationFixture
{
int argc;
char name[100];
char* argv[1];
QApplication* app;
public:
QApplicationFixture() :
argc(1)
{
strcpy(name, "rainback");
argv[0] = name;
app = new... | #define BOOST_TEST_MODULE rainback
#include "init.hpp"
#include <QCoreApplication>
struct QApplicationFixture
{
int argc;
char name[100];
char* argv[1];
QCoreApplication* app;
public:
QApplicationFixture() :
argc(1)
{
strcpy(name, "rainback");
argv[0] = name;
a... | Make the test fixture use QApplication | Make the test fixture use QApplication
| C++ | mit | Thonik/rainback |
159a7b3c531d09d98176699f212928da9bed8602 | test/Headers/wchar_limits.cpp | test/Headers/wchar_limits.cpp | // RUN: %clang_cc1 -fsyntax-only -verify %s
// RUN: %clang_cc1 -fsyntax-only -verify -fshort-wchar %s
#include <limits.h>
const bool swchar = (wchar_t)-1 > (wchar_t)0;
#ifdef __WCHAR_UNSIGNED__
int signed_test[!swchar];
#else
int signed_test[swchar];
#endif
int max_test[WCHAR_MAX == (swchar ? -(WCHAR_MIN+1) : (wcha... | // RUN: %clang -fsyntax-only -verify %s
// RUN: %clang -fsyntax-only -verify -fshort-wchar %s
#include <limits.h>
const bool swchar = (wchar_t)-1 > (wchar_t)0;
#ifdef __WCHAR_UNSIGNED__
int signed_test[!swchar];
#else
int signed_test[swchar];
#endif
int max_test[WCHAR_MAX == (swchar ? -(WCHAR_MIN+1) : (wchar_t)-1)]... | Fix test on MSVC: since the test includes a system header it cannot use clang_cc1. | Fix test on MSVC: since the test includes a system header it cannot use clang_cc1.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@135763 91177308-0d34-0410-b5e6-96231b3b80d8
| C++ | apache-2.0 | apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/cl... |
81b9b9d528b39e223e391cd4a15d1d4df296d5f2 | src/Thread.cpp | src/Thread.cpp |
#include <libclientserver.h>
Thread::Thread()
{
m_IsRunning = false;
m_IsDetached = false;
}
Thread::~Thread()
{
if (IsRunning())
Stop();
}
void Thread::Start()
{
m_IsRunning = true;
if (pthread_create(&m_thread, NULL, RunInternal, this) != 0)
abort();
}
void Thread::Stop()
{
#ifdef DEBUG
if (IsDetach... |
#include <libclientserver.h>
Thread::Thread()
{
m_IsRunning = false;
m_IsDetached = false;
}
Thread::~Thread()
{
if (IsRunning())
Stop();
}
void Thread::Start()
{
m_IsRunning = true;
if (pthread_create(&m_thread, NULL, RunInternal, this) != 0)
abort();
}
void Thread::Stop()
{
#ifdef DEBUG
if (IsDetach... | Fix State Tracking when thread stops | Fix State Tracking when thread stops
| C++ | mit | mistralol/libclientserver,mistralol/libclientserver |
85d0ae7b50f74f28ffd14870a72a2a9c32943ad6 | src/hotkey.cpp | src/hotkey.cpp | #include "hotkey.h"
#include "ui_hotkey.h"
hotkey::hotkey(QWidget *parent) :
s(s),
QWidget(parent),
ui(new Ui::hotkey)
{
ui->setupUi(this);
}
hotkey::~hotkey()
{
delete ui;
}
void hotkey::keyPressEvent(QKeyEvent *event)
{
int uKey = event->key();
Qt::Key key = static_cast<Qt::Key>(uKey);
... | #include "hotkey.h"
#include "ui_hotkey.h"
hotkey::hotkey(QWidget *parent) :
s(s),
QWidget(parent),
ui(new Ui::hotkey)
{
ui->setupUi(this);
}
hotkey::~hotkey()
{
delete ui;
}
void hotkey::keyPressEvent(QKeyEvent *event)
{
int uKey = event->key();
Qt::Key key = static_cast<Qt::Key>(uKey);
... | Allow meta key to be shortcut assigned | Allow meta key to be shortcut assigned
This follows the pattern that's already in place for assigning hotkeys.
I simply added the Qt binding for the meta key and now you can assign
meta hot keys!
| C++ | mit | mickaelperrin/Mutate,sespiros/Mutate,qdore/Mutate,janmaghuyop/Mutate,qdore/Mutate,qdore/Mutate,janmaghuyop/Mutate,sespiros/Mutate,tuvistavie/Mutate,mickaelperrin/Mutate,sespiros/Mutate,qdore/Mutate,janmaghuyop/Mutate,tuvistavie/Mutate,sespiros/Mutate,tuvistavie/Mutate,mickaelperrin/Mutate,janmaghuyop/Mutate,mickaelperr... |
c7da7b8d7eb6bbc8448864996609f8a63c3d66ab | framework/box.cpp | framework/box.cpp | #include "box.hpp"
Box::Box(): // default constructor
min_{0.0, 0.0, 0.0},
max_{0.0, 0.0, 0.0}
{}
Box::Box(Box const& b): // copy constructor
min_{b.min_},
max_{b.max_}
{}
Box::Box(Box&& b): // move constructor
Box()
{
swap(*this, b);
... | #include "box.hpp"
Box::Box(): // default constructor
min_{0.0, 0.0, 0.0},
max_{0.0, 0.0, 0.0}
{}
Box::Box(Box const& b): // copy constructor
min_{b.min_},
max_{b.max_}
{}
Box::Box(Box&& b): // move constructor
Box()
{
swap(*this, b);
... | Add dummy area and volume methods. | Add dummy area and volume methods.
| C++ | mit | elmeyer/programmiersprachen-raytracer,elmeyer/programmiersprachen-raytracer |
4d489c5be7e823e7e5fa1155d84060af47dd613f | src/util/Interrupt.cpp | src/util/Interrupt.cpp | /**********************************************************************
*
* GEOS - Geometry Engine Open Source
* http://geos.osgeo.org
*
* Copyright (C) 2012 Sandro Santilli <strk@keybit.net>
*
* This is free software; you can redistribute and/or modify it under
* the terms of the GNU Lesser General Public Lice... | /**********************************************************************
*
* GEOS - Geometry Engine Open Source
* http://geos.osgeo.org
*
* Copyright (C) 2012 Sandro Santilli <strk@keybit.net>
*
* This is free software; you can redistribute and/or modify it under
* the terms of the GNU Lesser General Public Lice... | Clear interruption request flag just before interrupting | Clear interruption request flag just before interrupting
git-svn-id: 6c2b1bd10c324c49ea9d9e6e31006a80e70507cb@3670 5242fede-7e19-0410-aef8-94bd7d2200fb
| C++ | lgpl-2.1 | WillieMaddox/libgeos,rkanavath/libgeos,gtourkas/libgeos,strk/libgeos,WillieMaddox/libgeos,manisandro/libgeos,mwtoews/libgeos,rkanavath/libgeos,libgeos/libgeos,rkanavath/libgeos,mwtoews/libgeos,mwtoews/libgeos,gtourkas/libgeos,manisandro/libgeos,WillieMaddox/libgeos,gtourkas/libgeos,mwtoews/libgeos,libgeos/libgeos,strk/... |
b516755c90500a2f050eb424acaf0016f35222c4 | main.cpp | main.cpp | #include <X11/keysym.h>
#include "grid.hpp"
#include "thumbnail_manager.hpp"
#include "x_connection.hpp"
#include "x_client_chooser.hpp"
#include "x_client_thumbnail_gl.hpp"
int main(int argc, char ** argv)
{
xcb_keysym_t east_key = XK_l;
xcb_keysym_t west_key = XK_h;
xcb_keysym_t north_key = XK_k;
xcb_keysym... | #include <signal.h>
#include <X11/keysym.h>
#include "grid.hpp"
#include "thumbnail_manager.hpp"
#include "x_connection.hpp"
#include "x_client_chooser.hpp"
#include "x_client_thumbnail_gl.hpp"
x_event_source_t * g_event_source = NULL;
void sig_handler(int signum)
{
if (g_event_source) g_event_source->shutdown();
... | Implement a simple signal handler | Implement a simple signal handler
| C++ | bsd-3-clause | jotrk/x-choyce,jotrk/x-choyce |
3e092123cf906c0494bc9d8ff81e240f0f8a8c46 | c++/two_sum.cpp | c++/two_sum.cpp | // Solution to the TwoSum problem from LeetCode
#include "two_sum.h"
TwoSum::TwoSum() {
}
vector<int> TwoSum::solver(vector<int>& nums, int target) {
for(int i=0; i<nums.size(); i++) {
for(int j=0; j<nums.size(); j++) {
int value = nums[i] + nums[j];
if ((value == target) && (i != j)) { // Ret... | // Solution to the TwoSum problem from LeetCode
#include "two_sum.h"
TwoSum::TwoSum() {
}
vector<int> TwoSum::solver(vector<int>& nums, int target) {
for(int i=0; i<nums.size(); i++) {
for(int j=0; j<nums.size(); j++) {
int sum = nums[i] + nums[j];
if ((sum == target) && (i != j)) { // Return ... | Rename variable value to sum | Rename variable value to sum
| C++ | mit | tsajed/coding-problems |
c7d7c2085dd130e224723add0360d31fdefe92ab | test/Tooling/clang-check-mac-libcxx-fixed-compilation-db.cpp | test/Tooling/clang-check-mac-libcxx-fixed-compilation-db.cpp | // Clang on MacOS can find libc++ living beside the installed compiler.
// This test makes sure our libTooling-based tools emulate this properly with
// fixed compilation database.
//
// RUN: rm -rf %t
// RUN: mkdir %t
//
// Install the mock libc++ (simulates the libc++ directory structure).
// RUN: cp -r %S/Inputs/moc... | // Clang on MacOS can find libc++ living beside the installed compiler.
// This test makes sure our libTooling-based tools emulate this properly with
// fixed compilation database.
//
// RUN: rm -rf %t
// RUN: mkdir %t
//
// Install the mock libc++ (simulates the libc++ directory structure).
// RUN: cp -r %S/Inputs/moc... | Set '-target' flag in the test checking the MacOS include dir | Set '-target' flag in the test checking the MacOS include dir
To fix a buildbot failure on PS4, see
http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast/builds/42251
The test was added in r351222 and aims to check only a particular
Mac configuration. However it relied on the default compiler t... | C++ | apache-2.0 | llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-cl... |
6e166e2a619f5cf4a72c432d3549dd0ac60619da | src/logger.cpp | src/logger.cpp | #include "logger.h"
Logger::Level Logger::logLevel = Logger::Level::ERROR;
void Logger::Error(std::string msg) {
std::cerr << "[Error]: " << msg.c_str() << std::endl;
}
void Logger::Warn(std::string msg) {
if (Logger::logLevel >= Logger::Level::WARN) {
std::cout << "[Warn]: " << msg.c_str() << std::endl;
}
}
v... | #include "logger.h"
Logger::Level Logger::logLevel = Logger::Level::WARN;
void Logger::Error(std::string msg) {
std::cerr << "[Error]: " << msg.c_str() << std::endl;
}
void Logger::Warn(std::string msg) {
if (Logger::logLevel >= Logger::Level::WARN) {
std::cout << "[Warn]: " << msg.c_str() << std::endl;
}
}
vo... | Change default log level to WARN | Change default log level to WARN
| C++ | bsd-3-clause | csvurt/assimp2xml3d |
93b7b5befe40c4a3f847c59071c4f2f6cd5325e7 | src/tstquery.cpp | src/tstquery.cpp | /*
* Copyright (c) 1998-2005, Index Data.
* See the file LICENSE for details.
*
* $Id: tstquery.cpp,v 1.2 2006-03-29 13:14:15 adam Exp $
*/
#include <stdlib.h>
#include <yazpp/z-query.h>
using namespace yazpp_1;
void tst1(const char *query_str_in, const char *query_expected)
{
Yaz_Z_Query q;
q = query... | /*
* Copyright (c) 1998-2006, Index Data.
* See the file LICENSE for details.
*
* $Id: tstquery.cpp,v 1.3 2006-07-07 12:57:15 adam Exp $
*/
#include <stdlib.h>
#include <yazpp/z-query.h>
using namespace yazpp_1;
void tst1(const char *query_str_in, const char *query_expected)
{
Yaz_Z_Query q;
q = query... | Update test becuase yaz_query_to_wrbuf now omits : before query type in string output. | Update test becuase yaz_query_to_wrbuf now omits : before
query type in string output.
| C++ | bsd-3-clause | indexgeo/yazpp,indexgeo/yazpp |
19f6f9674c23651702e97a8f7119430d0c45e768 | t/board_unittest.cpp | t/board_unittest.cpp | #include "board.hpp"
#include "gtest/gtest.h"
class BoardTest : public ::testing::Test {
protected:
BoardTest() : board_(1, 2) {
}
virtual ~BoardTest() {
}
virtual void SetUp() {
}
Quoridor::Board board_;
};
TEST_F(BoardTest, set_size)
{
board_.set_size(10, 11);
EXPECT_EQ(10, boa... | #include "board.hpp"
#include "exception.hpp"
#include "gtest/gtest.h"
class BoardTest : public ::testing::Test {
protected:
BoardTest() : board_(1, 2) {
}
Quoridor::Board board_;
};
TEST_F(BoardTest, ctor)
{
EXPECT_EQ(1, board_.row_num());
EXPECT_EQ(2, board_.col_num());
// test invalid Boar... | Add failure tests into Board unittests. | Add failure tests into Board unittests.
| C++ | mit | sfod/quoridor |
4941d366ef06dad0b0b185787865bfc26e126ac6 | tests/server_main.cc | tests/server_main.cc | /*
* ============================================================================
* Filename: server_main.cc
* Description: Server main for testing
* Version: 1.0
* Created: 04/25/2015 06:37:53 PM
* Revision: none
* Compiler: gcc
* Author: Rafael Gozlan, rafael.... | /*
* ============================================================================
* Filename: server_main.cc
* Description: Server main for testing
* Version: 1.0
* Created: 04/25/2015 06:37:53 PM
* Revision: none
* Compiler: gcc
* Author: Rafael Gozlan, rafael.... | Add stronger test for server | Testing: Add stronger test for server
| C++ | mit | FLIHABI/network,FLIHABI/network |
67f44b178bf117a252594535468ed1f42ab434c1 | test/Parser/cxx-using-declaration.cpp | test/Parser/cxx-using-declaration.cpp | // FIXME: Disabled, appears to have undefined behavior, and needs to be updated to match new warnings.
// RUN: clang-cc -fsyntax-only -verify %s
// XFAIL: *
namespace A {
int VA;
void FA() {}
struct SA { int V; };
}
using A::VA;
using A::FA;
using typename A::SA;
void main()
{
VA = 1;
FA();
S... | // RUN: clang-cc -fsyntax-only -verify %s
// XFAIL: *
namespace A {
int VA;
void FA() {}
struct SA { int V; };
}
using A::VA;
using A::FA;
using typename A::SA;
int main()
{
VA = 1;
FA();
SA x; //Still needs handling.
}
struct B {
void f(char){};
void g(char){};
};
struct D : B {
... | Tweak expected error to match what should happen, once using declarations work | Tweak expected error to match what should happen, once using declarations work
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@89876 91177308-0d34-0410-b5e6-96231b3b80d8
| C++ | apache-2.0 | apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/cl... |
8b3659165bb3f8670a4b856f30a4c648317c6232 | You-DataStore-Tests/datastore_api_test.cpp | You-DataStore-Tests/datastore_api_test.cpp | #include "stdafx.h"
#include "CppUnitTest.h"
#include "datastore.h"
#include "transaction.h"
#include "internal/operations/post_operation.h"
#include "dummy_values.h"
using Assert = Microsoft::VisualStudio::CppUnitTestFramework::Assert;
namespace You {
namespace DataStore {
namespace UnitTests {
TEST_CLASS(DataStore... | #include "stdafx.h"
#include "CppUnitTest.h"
#include "datastore.h"
#include "transaction.h"
#include "internal/operations/post_operation.h"
#include "dummy_values.h"
using Assert = Microsoft::VisualStudio::CppUnitTestFramework::Assert;
namespace You {
namespace DataStore {
namespace UnitTests {
TEST_CLASS(DataStore... | Add assert statement for unit test | Add assert statement for unit test
| C++ | mit | cs2103aug2014-w10-1c/main,cs2103aug2014-w10-1c/main |
c83f6212a79af38f97bc78c44429c1ea3f3995cd | unittests/IR/AttributesTest.cpp | unittests/IR/AttributesTest.cpp | //===- llvm/unittest/IR/AttributesTest.cpp - Attributes unit tests --------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... | //===- llvm/unittest/IR/AttributesTest.cpp - Attributes unit tests --------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... | Fix test to not use the AttributeSet's AttributeWithIndex creation method. | Fix test to not use the AttributeSet's AttributeWithIndex creation method.
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@173608 91177308-0d34-0410-b5e6-96231b3b80d8
| C++ | apache-2.0 | apple/swift-llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,dslab-epfl/asap,llvm-mirror/llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,dslab-epfl/asap,chubbymaggie/asap,chubbymaggie/asap,apple/swift-llvm,llvm-mirror/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,chubbymaggie/asap,llvm-mirror/llvm,GP... |
4d51714dd113e00e3d98957a3403fee361006d1c | test/tests/test_str_rope.cpp | test/tests/test_str_rope.cpp | /**
* Tests of str_rope and rope_node.
*
* @author Jean-Claude Paquin
**/
#include <catch.hpp>
#include <primitives/str_rope.h>
TEST_CASE("Empty rope_node", "[rope_node]") {
std::unique_ptr<rope_node> node = std::make_unique<rope_node>();
SECTION("Empty node has nullptr left & right") {
REQUIRE(!... | /**
* Tests of str_rope and rope_node.
*
* @author Jean-Claude Paquin
**/
#include <catch.hpp>
#include <primitives/str_rope.h>
TEST_CASE("Empty rope_node", "[rope_node]") {
std::unique_ptr<rope_node> node = std::make_unique<rope_node>();
SECTION("Empty node has nullptr left & right") {
REQUIRE(!... | Add more tests for rope_node | Add more tests for rope_node
| C++ | apache-2.0 | Magisun/Data-Structures |
60fc878a5c311cbc77e7cb4146cdf683284a0316 | test/CodeGenCXX/field-access-debug-info.cpp | test/CodeGenCXX/field-access-debug-info.cpp | // RUN: %clang_cc1 -g -S -masm-verbose -o - %s | FileCheck %s
// CHECK: abbrev_begin:
// CHECK: DW_AT_accessibility
// CHECK-NEXT: DW_FORM_data1
class A {
public:
int p;
private:
int pr;
};
A a;
| // RUN: %clang -g -S -emit-llvm %s -o - | FileCheck %s
// CHECK: [ DW_TAG_member ] [p] [{{[^]]*}}] [from int]
// CHECK: [ DW_TAG_member ] [pr] [{{[^]]*}}] [private] [from int]
class A {
public:
int p;
private:
int pr;
};
A a;
| Fix test case due to r196394 and improve it to not rely on LLVM code generation either. | Fix test case due to r196394 and improve it to not rely on LLVM code generation either.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@196399 91177308-0d34-0410-b5e6-96231b3b80d8
| C++ | apache-2.0 | llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-cl... |
e3e6c1c22b8e808dafa7502d2ddfcb04c2720c43 | test/asan/TestCases/Windows/iostream_sbo.cc | test/asan/TestCases/Windows/iostream_sbo.cc | // RUN: %clang_cl_asan -O0 %s -Fe%t
// RUN: echo "42" | %run %t 2>&1 | FileCheck %s
#include <iostream>
int main() {
int i;
std::cout << "Type i: ";
std::cin >> i;
return 0;
// CHECK: Type i:
// CHECK-NOT: AddressSanitizer: stack-buffer-overflow on address [[ADDR:0x[0-9a-f]+]]
}
| // First, check this works with the default blacklist:
// RUN: %clang_cl_asan -O0 %s -Fe%t
// RUN: echo "42" | %run %t 2>&1 | FileCheck %s
//
// Then, make sure it still works when a user uses his own blacklist file:
// RUN: %clang_cl_asan -O0 %s -fsanitize-blacklist=%p/../Helpers/initialization-blacklist.txt -Fe%t2
//... | Add a test case for PR22431 | [ASan/Win] Add a test case for PR22431
git-svn-id: c199f293c43da69278bea8e88f92242bf3aa95f7@228573 91177308-0d34-0410-b5e6-96231b3b80d8
| C++ | apache-2.0 | llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt |
f6a12ae9562fbba54ddc4d6ca6f0f997e33ae68b | UnitTests/ionStandardLibrary.cpp | UnitTests/ionStandardLibrary.cpp |
#include <ionCore.h>
#include <catch.hpp>
TEST_CASE("ionStandardLibrary::String::Build")
{
REQUIRE(String::Build("") == string());
REQUIRE(String::Build("Test") == "Test");
REQUIRE(String::Build("Hello %d", 123) == "Hello 123");
REQUIRE(String::Build("%c %d %X %s", 'a', 42, 0xABCD, "foo") == "a 42 ABCD... |
#include <ionCore.h>
#include <catch.hpp>
TEST_CASE("ionStandardLibrary::ConditionalMapAccess")
{
map<int, int *> Test;
REQUIRE(! ConditionalMapAccess(Test, 0));
REQUIRE(! ConditionalMapAccess(Test, 1));
REQUIRE(! ConditionalMapAccess(Test, 2));
int X, Y;
Test[0] = & X;
Test[1] = & Y;
Test[... | Add Conditional Map Access test | Add Conditional Map Access test
| C++ | mit | iondune/ionEngine,iondune/ionEngine |
d668679c170e612a1257e56bc9ce2dbcc0f964ac | SSPSolution/SSPSolution/ButtonEntity.cpp | SSPSolution/SSPSolution/ButtonEntity.cpp | #include "ButtonEntity.h"
ButtonEntity::ButtonEntity()
{
}
ButtonEntity::~ButtonEntity()
{
}
int ButtonEntity::Update(float dT, InputHandler * inputHandler)
{
int result = 0;
return result;
}
int ButtonEntity::React(int entityID, EVENT reactEvent)
{
int result = 0;
return result;
}
int ButtonEntity::Initial... | #include "ButtonEntity.h"
ButtonEntity::ButtonEntity()
{
}
ButtonEntity::~ButtonEntity()
{
}
int ButtonEntity::Update(float dT, InputHandler * inputHandler)
{
int result = 0;
return result;
}
int ButtonEntity::React(int entityID, EVENT reactEvent)
{
int result = 0;
return result;
}
int ButtonEntity::Initial... | UPDATE Initialize now calls InitializeBase as expected | UPDATE Initialize now calls InitializeBase as expected
| C++ | apache-2.0 | Chringo/SSP,Chringo/SSP |
cc3f8aa224fb100e3f66b36fbc96aea1e8b30580 | rice/detail/protect.cpp | rice/detail/protect.cpp | #include "protect.hpp"
#include "../Exception.hpp"
#include "../Jump_Tag.hpp"
#ifndef TAG_RAISE
#define TAG_RAISE 0x6
#endif
VALUE Rice::detail::
protect(
RUBY_VALUE_FUNC f,
VALUE arg)
{
int state = 0;
VALUE retval = rb_protect(f, arg, &state);
if(state != 0)
{
if(state == TAG_RAISE && ruby_errinf... | #include "protect.hpp"
#include "../Exception.hpp"
#include "../Jump_Tag.hpp"
#ifndef TAG_RAISE
#define TAG_RAISE 0x6
#endif
VALUE Rice::detail::
protect(
RUBY_VALUE_FUNC f,
VALUE arg)
{
int state = 0;
VALUE retval = rb_protect(f, arg, &state);
if(state != 0)
{
if(state == TAG_RAISE && RTEST(ruby_... | Reset ruby_errinfo when catching exceptions, otherwise exceptions can strangely be resurrected. | Reset ruby_errinfo when catching exceptions, otherwise exceptions can
strangely be resurrected.
| C++ | bsd-2-clause | der-scheme/rice,cout/rice,der-scheme/rice,der-scheme/rice,cout/rice,der-scheme/rice |
73b85c73209b402e876ddfae995625be0dcc6855 | common/vsteventkeeper.cpp | common/vsteventkeeper.cpp | #include "vsteventkeeper.h"
#include <cstdint>
namespace Airwave {
VstEventKeeper::VstEventKeeper() :
events_(nullptr),
data_(nullptr)
{
}
VstEventKeeper::~VstEventKeeper()
{
delete [] events_;
}
void VstEventKeeper::reload(int count, const VstEvent events[])
{
if(!events_ || events_->numEvents < count) {
... | #include "vsteventkeeper.h"
#include <algorithm>
#include <cstdint>
namespace Airwave {
VstEventKeeper::VstEventKeeper() :
events_(nullptr),
data_(nullptr)
{
}
VstEventKeeper::~VstEventKeeper()
{
delete [] events_;
}
void VstEventKeeper::reload(int count, const VstEvent events[])
{
if(!events_ || events_->... | Fix buffer size and memory offset calculations in VstEventKeeper | Fix buffer size and memory offset calculations in VstEventKeeper
| C++ | mit | UIKit0/airwave,phantom-code/airwave |
5eca327c908b60cb2fee3259fa5f347ad7b4bae8 | src/ui/AboutDialog.cc | src/ui/AboutDialog.cc | #include "configuration.h"
#include "AboutDialog.h"
#include "ui_AboutDialog.h"
#define define2string_p(x) #x
#define define2string(x) define2string_p(x)
AboutDialog::AboutDialog(QWidget *parent) :
QDialog(parent),
ui(new Ui::AboutDialog)
{
ui->setupUi(this);
connect(ui->okButton, SIGNAL(clicked()), t... | #include "configuration.h"
#include "AboutDialog.h"
#include "ui_AboutDialog.h"
#define define2string_p(x) #x
#define define2string(x) define2string_p(x)
AboutDialog::AboutDialog(QWidget *parent) :
QDialog(parent),
ui(new Ui::AboutDialog)
{
ui->setupUi(this);
connect(ui->okButton, SIGNAL(clicked()), t... | Enable http link in about box to launch system web browser | Enable http link in about box to launch system web browser
| C++ | agpl-3.0 | hejunbok/apm_planner,gpaes/apm_planner,hejunbok/apm_planner,LIKAIMO/apm_planner,hejunbok/apm_planner,diydrones/apm_planner,Icenowy/apm_planner,kellyschrock/apm_planner,LittleBun/apm_planner,diydrones/apm_planner,sutherlandm/apm_planner,381426068/apm_planner,duststorm/apm_planner,chen0510566/apm_planner,dcarpy/apm_plann... |
f00fb1265a8bc26e1612c771173325dbe49b3612 | src/util/syserror.cpp | src/util/syserror.cpp | // Copyright (c) 2020-2022 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#if defined(HAVE_CONFIG_H)
#include <config/bitcoin-config.h>
#endif
#include <tinyformat.h>
#include <util/syserror.h>
#in... | // Copyright (c) 2020-2022 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#if defined(HAVE_CONFIG_H)
#include <config/bitcoin-config.h>
#endif
#include <tinyformat.h>
#include <util/syserror.h>
#in... | Increase buffer size to 1024 in SysErrorString | util: Increase buffer size to 1024 in SysErrorString
Increase the error message buffer to 1024 as recommended in the manual
page (Thanks Jon Atack)
| C++ | mit | namecoin/namecoin-core,mruddy/bitcoin,jlopp/statoshi,anditto/bitcoin,kallewoof/bitcoin,GroestlCoin/bitcoin,fujicoin/fujicoin,andreaskern/bitcoin,jambolo/bitcoin,instagibbs/bitcoin,jambolo/bitcoin,GroestlCoin/bitcoin,AkioNak/bitcoin,GroestlCoin/bitcoin,bitcoin/bitcoin,domob1812/bitcoin,fanquake/bitcoin,tecnovert/particl... |
34b9a7dcb135487384df163efadeb63f99a67dec | lib/MC/MCSchedule.cpp | lib/MC/MCSchedule.cpp | //===- MCSchedule.cpp - Scheduling ------------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... | //===- MCSchedule.cpp - Scheduling ------------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... | Add <type_traits> for is_pod, fixing r241947 | Add <type_traits> for is_pod, fixing r241947
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@241949 91177308-0d34-0410-b5e6-96231b3b80d8
| C++ | apache-2.0 | apple/swift-llvm,llvm-mirror/llvm,apple/swift-llvm,dslab-epfl/asap,apple/swift-llvm,llvm-mirror/llvm,dslab-epfl/asap,llvm-mirror/llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,llvm-mirror/llvm,llvm-mirror/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,GPUOpe... |
b05009ad140911ba3e3dcb15627c6408e75bc3d0 | vm/builtin/atomic.cpp | vm/builtin/atomic.cpp |
#include "builtin/class.hpp"
#include "builtin/atomic.hpp"
#include "ontology.hpp"
namespace rubinius {
void AtomicReference::init(STATE) {
GO(atomic_ref).set(ontology::new_class(state,
"AtomicReference", G(object), G(rubinius)));
G(atomic_ref)->set_object_type(state, AtomicReferenceType);
}
... |
#include "builtin/class.hpp"
#include "builtin/atomic.hpp"
#include "ontology.hpp"
namespace rubinius {
void AtomicReference::init(STATE) {
GO(atomic_ref).set(ontology::new_class(state,
"AtomicReference", G(object), G(rubinius)));
G(atomic_ref)->set_object_type(state, AtomicReferenceType);
}
... | Fix GC-related SEGV when heavily using AtomicReference | Fix GC-related SEGV when heavily using AtomicReference
| C++ | mpl-2.0 | benlovell/rubinius,lgierth/rubinius,kachick/rubinius,jsyeo/rubinius,benlovell/rubinius,jemc/rubinius,dblock/rubinius,mlarraz/rubinius,ngpestelos/rubinius,dblock/rubinius,Wirachmat/rubinius,lgierth/rubinius,heftig/rubinius,digitalextremist/rubinius,ngpestelos/rubinius,pH14/rubinius,digitalextremist/rubinius,lgierth/rubi... |
1a505d7221c55569aba9ed4c8ad272df433a3c77 | practice04/06.cpp | practice04/06.cpp | #include <stdio.h>
#define MAX_LOOP 10000
double formula(const double x, const double k)
{
return (x * x) / ((2 * k - 1) * (2 * k));
}
int main(void)
{
double x;
printf("Enter x= ");
scanf("%lf", &x);
double cosx = 1,
sinx = x;
int k = 2;
while(k < MAX_LOOP)
{
... | #include <stdio.h>
#define MAX_LOOP 100
double cosine_formula(const double x, const double k)
{
if(k == 0) return 1;
return (x * x) / ((2 * k - 1) * (2 * k));
}
double sine_formula(const double x, const double k)
{
if(k == 0) return x;
return (x * x) / ((2 * k) * (2 * k + 1));
}
int main(void)
{
... | Fix the incorrect output bug | Fix the incorrect output bug
| C++ | mit | kdzlvaids/problem_solving-pknu-2016,kdzlvaids/problem_solving-pknu-2016 |
f07800cfa78ebc66e432818698bd9795d246d123 | src/arithmetics.cpp | src/arithmetics.cpp | #include "arithmetics.hpp"
namespace arithmetics
{
int add(int a, int b)
{
return a + b;
}
int add_buggy(int a, int b)
{
return a + b + 1;
}
}
| #include "arithmetics.hpp"
namespace arithmetics
{
int add(int a, int b)
{
return a + b;
}
int add_buggy(int a, int b)
{
return a + b;
}
}
| Fix bug to see efect for Travis | Fix bug to see efect for Travis
| C++ | mit | daixtrose/continuous-integration-demo,daixtrose/continuous-integration-demo |
2866543eeca4fefea005d523d93bc2ed30113458 | src/game/ld22/other.cpp | src/game/ld22/other.cpp | #include "other.hpp"
using namespace LD22;
Other::~Other()
{ }
void Other::advance()
{
Walker::advance();
}
| #include "other.hpp"
#include "item.hpp"
using namespace LD22;
Other::~Other()
{ }
void Other::advance()
{
scanItems();
if (m_item) {
int wx = centerx(), wy = centery();
int ix = m_item->centerx(), iy = m_item->centery();
int dx = ix - wx, dy = iy - wy;
if (dx < -20)
... | Make Other chase after items | Make Other chase after items
| C++ | bsd-2-clause | depp/sglib,depp/sglib |
76555827b7a0c507d544a6c2a280ab8ed474e73e | searchcore/src/vespa/searchcore/proton/documentmetastore/lid_reuse_delayer_config.cpp | searchcore/src/vespa/searchcore/proton/documentmetastore/lid_reuse_delayer_config.cpp | // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "lid_reuse_delayer_config.h"
#include <vespa/searchcore/proton/server/documentdbconfig.h>
namespace proton::documentmetastore {
LidReuseDelayerConfig::LidReuseDelayerConfig(const DocumentDB... | // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "lid_reuse_delayer_config.h"
#include <vespa/searchcore/proton/server/documentdbconfig.h>
namespace proton::documentmetastore {
LidReuseDelayerConfig::LidReuseDelayerConfig(const DocumentDB... | Allow early ack on non-zero visibility delay. | Allow early ack on non-zero visibility delay.
| C++ | apache-2.0 | vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa |
6466ff24438bc058f71e21714b3322cd0c882daa | src/ofxTPSprite.cpp | src/ofxTPSprite.cpp | // ------------------------------------------------------------------
// ofxTPSprite.cpp
// ofxTexturePacker - https://www.github.com/danoli3/ofxTexturePacker
// Created by Daniel Rosser and Colin Friend on 9/06/2014.
// ------------------------------------------------------------------
#include "ofxTPSprite.h"
ofxTPS... | // ------------------------------------------------------------------
// ofxTPSprite.cpp
// ofxTexturePacker - https://www.github.com/danoli3/ofxTexturePacker
// Created by Daniel Rosser and Colin Friend on 9/06/2014.
// ------------------------------------------------------------------
#include "ofxTPSprite.h"
ofxTPS... | Fix for 0.9.0 texture issues | Fix for 0.9.0 texture issues
| C++ | mit | danoli3/ofxTexturePacker,danoli3/ofxTexturePacker |
c481cffd450d43a2b5833ef0e1107ee89fb3bade | tensorflow/core/profiler/internal/gpu/cupti_utils.cc | tensorflow/core/profiler/internal/gpu/cupti_utils.cc | /* Copyright 2019 The TensorFlow Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or a... | /* Copyright 2019 The TensorFlow Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or a... | Enable usage of CuptiErrorManager on all the platforms. | Enable usage of CuptiErrorManager on all the platforms.
PiperOrigin-RevId: 397131526
Change-Id: I6f180d63188f5c67a7666bc490e131408b1851ee
| C++ | apache-2.0 | yongtang/tensorflow,paolodedios/tensorflow,yongtang/tensorflow,paolodedios/tensorflow,Intel-tensorflow/tensorflow,tensorflow/tensorflow,karllessard/tensorflow,yongtang/tensorflow,Intel-tensorflow/tensorflow,karllessard/tensorflow,tensorflow/tensorflow-pywrap_saved_model,tensorflow/tensorflow-experimental_link_static_li... |
eddf89a321cd3d23a06b2ec05ad9f59b01c00a2e | src/nostalgia/studio/main.cpp | src/nostalgia/studio/main.cpp | /*
* Copyright 2016 - 2019 gtalent2@gmail.com
*
* 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 <QApplication>
#include <QDebug>
#include <ox/clargs/c... | /*
* Copyright 2016 - 2019 gtalent2@gmail.com
*
* 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 <QApplication>
#include <QDebug>
#include <ox/clargs/c... | Fix timing of setting HiDPI options | [nostalgia/studio] Fix timing of setting HiDPI options
| C++ | mpl-2.0 | wombatant/nostalgia,wombatant/nostalgia,wombatant/nostalgia |
83643402b975af94b52408e35ab485434c593e56 | blocks/manu343726/turbo_main/main.cpp | blocks/manu343726/turbo_main/main.cpp | /******************************************************************************
* Turbo C++11 metaprogramming Library *
* *
* Copyright (C) 2013 - 2014, Manuel Sánchez Pérez *
... | /******************************************************************************
* Turbo C++11 metaprogramming Library *
* *
* Copyright (C) 2013 - 2014, Manuel Sánchez Pérez *
... | Revert "Testing -lPUBLIC error using turbo_computing blockdependencies" | Revert "Testing -lPUBLIC error using turbo_computing blockdependencies"
This reverts commit 887702ee386c4cdff6c5039c51d84a5c93099a13.
| C++ | mit | Manu343726/Turbo |
69e7c057835594c6da3498db692ba914afa0497e | test/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/default01.fail.cpp | test/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/default01.fail.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.
//
//===----------------------------------------... | //===----------------------------------------------------------------------===//
//
// 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.
//
//===----------------------------------------... | Add return statement to a test class's assignment operator. Defect found by Coverity Scan. | Add return statement to a test class's assignment operator. Defect found by Coverity Scan.
git-svn-id: 756ef344af921d95d562d9e9f9389127a89a6314@216317 91177308-0d34-0410-b5e6-96231b3b80d8
| C++ | apache-2.0 | llvm-mirror/libcxx,llvm-mirror/libcxx,llvm-mirror/libcxx,llvm-mirror/libcxx,llvm-mirror/libcxx |
bb853716c155f6d66be5deb782647e7ce6c22537 | src/BenchmarkStack.cpp | src/BenchmarkStack.cpp | #include "BenchmarkStack.h"
#include "StackAllocator.h"
BenchmarkStack::BenchmarkStack(const int runtime)
: Benchmark(runtime) {
}
BenchmarkResults BenchmarkStack::allocation() {
setStartTimer();
StackAllocator stackAllocator(1e10);
int operations = 0;
while(!outOfTime()){
stackAllocator.Allocate(sizeof(int... | #include "BenchmarkStack.h"
#include "StackAllocator.h"
BenchmarkStack::BenchmarkStack(const int runtime)
: Benchmark(runtime) {
}
BenchmarkResults BenchmarkStack::allocation() {
setStartTimer();
StackAllocator stackAllocator(1e10);
int operations = 0;
while(!outOfTime()){
stackAllocator.Allocate(sizeof(int... | Reset stack before benchmark finishes. | Reset stack before benchmark finishes.
| C++ | mit | mtrebi/memory-allocators |
6046d0c42aea6115c0f376c7bad45672ae3ca393 | test/SemaCXX/ms-iunknown-template-function.cpp | test/SemaCXX/ms-iunknown-template-function.cpp | // RUN: %clang_cc1 -triple x86_64-unknown-unknown -fsyntax-only -verify -fms-extensions %s
typedef long HRESULT;
typedef unsigned long ULONG;
typedef struct _GUID {
unsigned long Data1;
unsigned short Data2;
unsigned short Data3;
unsigned char Data4[8];
} GUID;
typedef GUID IID;
// remove stdcall, since the wa... | // RUN: %clang_cc1 -fsyntax-only -verify -fms-extensions %s
// expected-no-diagnostics
typedef long HRESULT;
typedef unsigned long ULONG;
typedef struct _GUID {
unsigned long Data1;
unsigned short Data2;
unsigned short Data3;
unsigned char Data4[8];
} GUID;
typedef GUID IID;
// remove stdcall, since the warnin... | Update IUnknown lit test to pass on Win32 | Update IUnknown lit test to pass on Win32
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@314687 91177308-0d34-0410-b5e6-96231b3b80d8
| C++ | apache-2.0 | llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-cl... |
3f4a8b8d9e3cd91818128ac99e15aa6230770e44 | components/pango_video/src/video_help.cpp | components/pango_video/src/video_help.cpp | #include <pangolin/video/video_help.h>
#include <pangolin/video/video_interface.h>
namespace pangolin
{
void PrintPixelFormats(std::ostream& out, bool color)
{
const std::string c_normal = color ? "\033[0m" : "";
const std::string c_alias = color ? "\033[32m" : "";
out << "Supported pixel format codes (... | #include <pangolin/video/video_help.h>
#include <pangolin/video/video_interface.h>
#include <pangolin/factory/RegisterFactoriesVideoInterface.h>
#include <pangolin/factory/RegisterFactoriesVideoOutputInterface.h>
namespace pangolin
{
void PrintPixelFormats(std::ostream& out, bool color)
{
const std::string c_nor... | Fix help system which was not registering factory methods before trying to enumerate them. | [video] Fix help system which was not registering factory methods before trying to enumerate them.
| C++ | mit | mp3guy/Pangolin,stevenlovegrove/Pangolin,stevenlovegrove/Pangolin,mp3guy/Pangolin,stevenlovegrove/Pangolin,mp3guy/Pangolin |
68d0f230e9ec6cbc275cb703c28e3cdff5071068 | test/std/utilities/meta/meta.unary/meta.unary.prop/is_swappable_include_order.pass.cpp | test/std/utilities/meta/meta.unary/meta.unary.prop/is_swappable_include_order.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.
//
//===----------------------------------------... | //===----------------------------------------------------------------------===//
//
// 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.
//
//===----------------------------------------... | Fix use of terse static assert. Patch from STL@microsoft.com | Fix use of terse static assert. Patch from STL@microsoft.com
git-svn-id: 756ef344af921d95d562d9e9f9389127a89a6314@274206 91177308-0d34-0410-b5e6-96231b3b80d8
| C++ | apache-2.0 | llvm-mirror/libcxx,llvm-mirror/libcxx,llvm-mirror/libcxx,llvm-mirror/libcxx,llvm-mirror/libcxx |
4e44c0ea31d142d1412e4fa7001a1654ff6afd2e | test/C++Frontend/2003-09-29-ArgumentNumberMismatch.cpp | test/C++Frontend/2003-09-29-ArgumentNumberMismatch.cpp | struct C {
int A, B;
~C() {}
void operator^(C b) const { }
};
void test(C *P) {
*P ^ *P;
}
| // Non-POD classes cannot be passed into a function by component, because their
// dtors must be run. Instead, pass them in by reference. The C++ front-end
// was mistakenly "thinking" that 'foo' took a structure by component.
struct C {
int A, B;
~C() {}
};
void foo(C b);
void test(C *P) {
foo(*P... | Simplify test, include problem analysis | Simplify test, include problem analysis
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@8747 91177308-0d34-0410-b5e6-96231b3b80d8
| C++ | apache-2.0 | GPUOpen-Drivers/llvm,chubbymaggie/asap,dslab-epfl/asap,dslab-epfl/asap,chubbymaggie/asap,GPUOpen-Drivers/llvm,apple/swift-llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,llvm-mirror/llvm,llvm-mirror/llvm,llvm-mirror/llvm,apple/swift-llvm,chubbymaggie/asap,llvm-mirror/llv... |
4bbca5733a31002b17739ebb28933b5504b6feea | src/CActor.cpp | src/CActor.cpp | #include <memory>
#include "Vec2i.h"
#include "IMapElement.h"
#include "CActor.h"
namespace WizardOfGalicia {
CActor::CActor() {
emission = 0;
stance = Stance::STANDING;
attack = 0;
defence = 0;
hp = 0;
direction = Direction::N;
}
bool CActor::canMove() {
return true;
}
bo... | #include <memory>
#include "Vec2i.h"
#include "IMapElement.h"
#include "CActor.h"
namespace WizardOfGalicia {
CActor::CActor() {
emission = 0;
stance = Stance::STANDING;
attack = 0;
defence = 0;
hp = 0;
direction = Direction::N;
}
bool CActor::canMove() {
return true;
}
bo... | Change energy absorption, so you only absorb part of the enemy energy | Change energy absorption, so you only absorb part of the enemy energy
Increasing energy based on your own was too much.
But this might change again.
| C++ | bsd-2-clause | TheFakeMontyOnTheRun/wizardofgalicia,TheFakeMontyOnTheRun/wizardofgalicia |
04dfc3c569d017adef011eb370c98d5902b0c0cd | src/gtest/test_keystore.cpp | src/gtest/test_keystore.cpp | #include <gtest/gtest.h>
#include "keystore.h"
#include "zcash/Address.hpp"
TEST(keystore_tests, store_and_retrieve_spending_key) {
CBasicKeyStore keyStore;
std::set<libzcash::PaymentAddress> addrs;
keyStore.GetPaymentAddresses(addrs);
ASSERT_EQ(0, addrs.size());
auto sk = libzcash::SpendingKey:... | #include <gtest/gtest.h>
#include "keystore.h"
#include "zcash/Address.hpp"
TEST(keystore_tests, store_and_retrieve_spending_key) {
CBasicKeyStore keyStore;
libzcash::SpendingKey skOut;
std::set<libzcash::PaymentAddress> addrs;
keyStore.GetPaymentAddresses(addrs);
ASSERT_EQ(0, addrs.size());
... | Rework test to check for failure to return a spending key | Rework test to check for failure to return a spending key
| C++ | mit | bitcoinsSG/zcash,CTRoundTable/Encrypted.Cash,bitcoinsSG/zcash,bitcoinsSG/zcash,CTRoundTable/Encrypted.Cash,bitcoinsSG/zcash,bitcoinsSG/zcash,CTRoundTable/Encrypted.Cash,bitcoinsSG/zcash,CTRoundTable/Encrypted.Cash,CTRoundTable/Encrypted.Cash,CTRoundTable/Encrypted.Cash |
e198acc81c1ef0ad38d617039a062fe6de23eb46 | src/main.cpp | src/main.cpp | /* Copyright 2014-2015 Juhani Numminen
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agree... | /* Copyright 2014-2015 Juhani Numminen
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agree... | Add a simple option parser | Add a simple option parser
| C++ | apache-2.0 | jnumm/pong--11 |
ddb685a14f735ab4adfd6fadfd0e34372fe5fde0 | src/tinydm.cpp | src/tinydm.cpp | #include "DownloadManager.h"
#include <cstdio>
#include <iostream>
#include <string>
using namespace tinydm;
int main(int argc, char **argv) {
if (argc < 2) {
std::cerr << "Usage: tinydm [threads]" << std::endl;
return EXIT_FAILURE;
}
int threads = std::atoi(argv[1]);
if (threads == 0) {
std::ce... | #include "DownloadManager.h"
#include <cstdio>
#include <iostream>
#include <string>
using namespace tinydm;
int main(int argc, char **argv) {
if (argc < 2) {
std::cerr << "Usage: tinydm [threads]" << std::endl;
return EXIT_FAILURE;
}
int threads = std::atoi(argv[1]);
if (threads <= 0) {
std::ce... | Check for positive number of threads. | Check for positive number of threads.
Fixes #1
| C++ | mit | JDevlieghere/tinydm |
1c5214ca2b2ad17ef72db5b01a3c6abc8ba3b534 | src/tests/primitive_type_tests.cpp | src/tests/primitive_type_tests.cpp | // Copyright 2008 Paul Hodge
#include "common_headers.h"
#include "circa.h"
#include "tests/common.h"
namespace circa {
namespace primitive_type_tests {
void strings()
{
Branch* branch = new Branch();
Term* str1 = constant_string(branch, "one");
Term* str2 = constant_string(branch, "two");
test_ass... | // Copyright 2008 Paul Hodge
#include "common_headers.h"
#include "circa.h"
#include "tests/common.h"
namespace circa {
namespace primitive_type_tests {
void strings()
{
Branch* branch = new Branch();
Term* str1 = constant_string(branch, "one");
Term* str2 = constant_string(branch, "two");
test_ass... | Add a test case for some builtin objects | Add a test case for some builtin objects
| C++ | mit | andyfischer/circa,andyfischer/circa,andyfischer/circa,andyfischer/circa |
56d86168720849e94cb39809a29e7c391300460d | lib/Support/PluginLoader.cpp | lib/Support/PluginLoader.cpp | //===-- PluginLoader.cpp - Implement -load command line option ------------===//
//
// This file implements the -load <plugin> command line option processor. When
// linked into a program, this new command line option is available that allows
// users to load shared objects into the running program.
//
// Note that th... | //===-- PluginLoader.cpp - Implement -load command line option ------------===//
//
// This file implements the -load <plugin> command line option processor. When
// linked into a program, this new command line option is available that allows
// users to load shared objects into the running program.
//
// Note that th... | Change to use LinkDynamicObject instead of dlopen. | Change to use LinkDynamicObject instead of dlopen.
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@9011 91177308-0d34-0410-b5e6-96231b3b80d8
| C++ | apache-2.0 | GPUOpen-Drivers/llvm,chubbymaggie/asap,dslab-epfl/asap,chubbymaggie/asap,llvm-mirror/llvm,llvm-mirror/llvm,apple/swift-llvm,chubbymaggie/asap,apple/swift-llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,dslab-epfl/asap,apple/swift-llvm,llvm-mirror/llvm,llvm-mirror/llvm,chubbymaggie/asap,GPUOpen-Drivers/llvm,llvm-mirror/llvm,... |
976b39cbed9760988ac96d7dbbbe99088bebcae1 | test/scenarios/join_dependent_on_lock.cpp | test/scenarios/join_dependent_on_lock.cpp | /**
* This test checks whether we detect a deadlock arising from a parent thread
* trying to join a child who requires a lock held by its parent in order to
* finish.
*/
#include <d2mock.hpp>
int main(int argc, char const* argv[]) {
d2mock::mutex G;
d2mock::thread t1([&] {
G.lock();
G.un... | /**
* This test checks whether we detect a deadlock arising from a parent thread
* trying to join a child who requires a lock held by its parent in order to
* finish.
*/
#include <d2mock.hpp>
int main(int argc, char const* argv[]) {
d2mock::mutex G;
d2mock::thread t1([&] {
G.lock();
G.un... | Fix unused variable warning in a scenario. | Fix unused variable warning in a scenario.
| C++ | mit | ldionne/d2 |
b7b13a9bb4783c07c7f83a336382d74eec1f6257 | proctor/src/main.cpp | proctor/src/main.cpp | #include <omp.h>
#include "proctor/detector.h"
#include "proctor/proctor.h"
#include "proctor/scanning_model_source.h"
#include "proctor/basic_proposer.h"
using pcl::proctor::Detector;
//using pcl::proctor::ProctorMPI;
using pcl::proctor::Proctor;
using pcl::proctor::ScanningModelSource;
using pcl::proctor::BasicProp... | #include "proctor/detector.h"
#include "proctor/proctor.h"
#include "proctor/scanning_model_source.h"
#include "proctor/basic_proposer.h"
using pcl::proctor::Detector;
//using pcl::proctor::ProctorMPI;
using pcl::proctor::Proctor;
using pcl::proctor::ScanningModelSource;
using pcl::proctor::BasicProposer;
int main(in... | Remove unneeded OpenMP header import. | Remove unneeded OpenMP header import.
git-svn-id: 1af002208e930b4d920e7c2b948d1e98a012c795@3877 a9d63959-f2ad-4865-b262-bf0e56cfafb6
| C++ | bsd-3-clause | psoetens/pcl-svn,psoetens/pcl-svn,psoetens/pcl-svn,psoetens/pcl-svn,psoetens/pcl-svn |
c4b59f97e8fa7b960cd9a3686a32d01d6bc771ce | src/cpp/community/NodeStructuralRandMeasure.cpp | src/cpp/community/NodeStructuralRandMeasure.cpp | /*
* RandMeasure.cpp
*
* Created on: 19.01.2013
* Author: Christian Staudt (christian.staudt@kit.edu)
*/
#include "NodeStructuralRandMeasure.h"
namespace NetworKit {
double NodeStructuralRandMeasure::getDissimilarity(const Graph& G, const Partition& first, const Partition& second) {
count n = G.numberO... | /*
* RandMeasure.cpp
*
* Created on: 19.01.2013
* Author: Christian Staudt (christian.staudt@kit.edu)
*/
#include "NodeStructuralRandMeasure.h"
namespace NetworKit {
double NodeStructuralRandMeasure::getDissimilarity(const Graph& G, const Partition& first, const Partition& second) {
count n = G.numberO... | Fix node-structural Rand measure to not to be binary | Fix node-structural Rand measure to not to be binary
Before this fix, the node-structural rand-measure returned 0 for
completely identical clusterings and 1 otherwise.
| C++ | mit | fmaschler/networkit,fmaschler/networkit,fmaschler/networkit,fmaschler/networkit,fmaschler/networkit,fmaschler/networkit |
639df2f78af2faa8d010d52060681b08a77819ba | src/Application/UpdateModule/UpdateModuleMac.cpp | src/Application/UpdateModule/UpdateModuleMac.cpp | // For conditions of distribution and use, see copyright notice in license.txt
#include "UpdateModuleMac.h"
#include "Framework.h"
#include "CoreDefines.h"
#include "Application.h"
UpdateModule::UpdateModule() :
IModule("UpdateModule"),
updater_(0)
{
}
UpdateModule::~UpdateModule()
{
}
void UpdateModule::I... | // For conditions of distribution and use, see copyright notice in license.txt
#include "UpdateModuleMac.h"
#include "Framework.h"
#include "CoreDefines.h"
#include "Application.h"
UpdateModule::UpdateModule() :
IModule("UpdateModule"),
updater_(0)
{
}
UpdateModule::~UpdateModule()
{
}
void UpdateModule::I... | Check for updates on startup | UpdateModule: Check for updates on startup
| C++ | apache-2.0 | BogusCurry/tundra,BogusCurry/tundra,jesterKing/naali,pharos3d/tundra,pharos3d/tundra,pharos3d/tundra,pharos3d/tundra,AlphaStaxLLC/tundra,realXtend/tundra,BogusCurry/tundra,AlphaStaxLLC/tundra,realXtend/tundra,realXtend/tundra,AlphaStaxLLC/tundra,jesterKing/naali,realXtend/tundra,jesterKing/naali,jesterKing/naali,jester... |
af74731690a7e2a5d16ba0da106c47c5038db542 | restnotifier/main.cpp | restnotifier/main.cpp | #include <QApplication>
#include <QSettings>
#include <QLocale>
#include <QTranslator>
#include <QLibraryInfo>
#include "trayicon.h"
int main(int argc, char **argv)
{
QApplication app(argc, argv);
QApplication::setOrganizationName("Restnotifier");
app.setQuitOnLastWindowClosed(false);
// Set langua... | #include <QApplication>
#include <QSettings>
#include <QLocale>
#include <QTranslator>
#include <QLibraryInfo>
#include "trayicon.h"
int main(int argc, char **argv)
{
QApplication app(argc, argv);
QApplication::setOrganizationName("Restnotifier");
app.setQuitOnLastWindowClosed(false);
// Set langua... | Improve preprocessor usage a bit | Improve preprocessor usage a bit
| C++ | mit | swarmer/restnotifier,swarmer/restnotifier,swarmer/restnotifier |
57d9cb67524e7aa1934450bd4c73d54d613bb70b | code/ranlux32.cpp | code/ranlux32.cpp | /*
* rngs
* ECE 541 Project 2
* Kashev Dalmia - dalmia3
* David Huang - huang157
*/
#include "ranlux32.h"
namespace rng
{
RANLUX32::RANLUX32() :
RandomNumberGenerator(),
prev(0),
count(0),
state(),
index(0)
{}
void RANLUX32::seed(fuint seed_num) {
st... | /*
* rngs
* ECE 541 Project 2
* Kashev Dalmia - dalmia3
* David Huang - huang157
*/
#include "ranlux32.h"
namespace rng
{
RANLUX32::RANLUX32() :
RandomNumberGenerator(),
prev(0),
count(0),
state(),
index(0)
{}
void RANLUX32::seed(fuint seed_num) {
st... | Change seed generation using MINSTD | Change seed generation using MINSTD
| C++ | mit | kashev/rngs,kashev/rngs,kashev/rngs |
a483730565008caf35dd2728bdcc7b450d0de37f | doc/snippets/DenseBase_setLinSpaced.cpp | doc/snippets/DenseBase_setLinSpaced.cpp | VectorXf v;
v.setLinSpaced(5,0.5f,1.5f).transpose();
cout << v << endl;
| VectorXf v;
v.setLinSpaced(5,0.5f,1.5f);
cout << v << endl;
| Remove confusing transpose() in setLinSpaced() docs. | Remove confusing transpose() in setLinSpaced() docs.
--HG--
extra : transplant_source : %F0%11%00%02%C1%9C%CF%B3%8F%E9%DC%2B%97%DD%5C%7C%06%7C%21%3B
| C++ | bsd-3-clause | mjbshaw/Eigen,rotorliu/eigen,madlib/eigen_backup,madlib/eigen_backup,madlib/eigen_backup,madlib/eigen_backup,rotorliu/eigen,rotorliu/eigen,rotorliu/eigen,mjbshaw/Eigen,mjbshaw/Eigen,mjbshaw/Eigen |
ca3149ce35422c5302210a213fafa18af20e246f | electron-dotnet/src/mono/dictionary.cpp | electron-dotnet/src/mono/dictionary.cpp | #include "edge.h"
void Dictionary::Add(MonoObject* _this, const char* name, MonoObject* value)
{
static MonoMethod* add;
if(!add) {
add = mono_class_get_method_from_name(mono_object_get_class(_this),
"System.Collections.Generic.IDictionary<string,object>.Add", -1);
}
void* pa... | #include "edge.h"
void Dictionary::Add(MonoObject* _this, const char* name, MonoObject* value)
{
static MonoMethod* add;
if(!add) {
add = mono_class_get_method_from_name(mono_object_get_class(_this),
"System.Collections.Generic.IDictionary<string,object>.Add", -1);
// This is to ... | Fix crash for mono 5.0. | Fix crash for mono 5.0.
| C++ | mit | xamarin/WebSharp,xamarin/WebSharp,xamarin/WebSharp,xamarin/WebSharp,xamarin/WebSharp,xamarin/WebSharp |
5a3ec28bfc2f85584aeea05ce3795e4fb915e296 | You-DataStore-Tests/datastore_api_test.cpp | You-DataStore-Tests/datastore_api_test.cpp | #include "stdafx.h"
#include "CppUnitTest.h"
#include "datastore.h"
#include "transaction.h"
#include "internal/operations/post_operation.h"
#include "dummy_values.h"
using Assert = Microsoft::VisualStudio::CppUnitTestFramework::Assert;
namespace You {
namespace DataStore {
namespace UnitTests {
TEST_CLASS(DataStore... | #include "stdafx.h"
#include "CppUnitTest.h"
#include "datastore.h"
#include "transaction.h"
#include "internal/operations/post_operation.h"
#include "internal/operations/put_operation.h"
#include "internal/operations/erase_operation.h"
#include "dummy_values.h"
using Assert = Microsoft::VisualStudio::CppUnitTestFram... | Add more tests for Transaction | Add more tests for Transaction
| C++ | mit | cs2103aug2014-w10-1c/main,cs2103aug2014-w10-1c/main |
7181f56dd8446251c9d8fc69725c41602119bef5 | src/source/zombye/gameplay/states/menu_state.cpp | src/source/zombye/gameplay/states/menu_state.cpp | #include <zombye/gameplay/states/menu_state.hpp>
#include <zombye/rendering/camera_component.hpp>
using namespace std::string_literals;
zombye::menu_state::menu_state(zombye::state_machine *sm) : sm_(sm) {
}
void zombye::menu_state::enter() {
zombye::log("enter menu state");
}
void zombye::menu_state::leave() ... | #include <zombye/gameplay/states/menu_state.hpp>
#include <zombye/rendering/camera_component.hpp>
using namespace std::string_literals;
zombye::menu_state::menu_state(zombye::state_machine *sm) : sm_(sm) {
}
void zombye::menu_state::enter() {
zombye::log("enter menu state");
auto& camera = sm_->get_game()->... | Revert "remove georgs fancy camera and mesh stuff" | Revert "remove georgs fancy camera and mesh stuff"
This reverts commit 29c1a554537053a40cc66e712d5ec1ab23bcba4f.
| C++ | mit | kasoki/project-zombye,kasoki/project-zombye,kasoki/project-zombye |
34105548daf797b6fdd0e9ff4cd4e184c71c0700 | platform/default/cuda_libdevice_path.cc | platform/default/cuda_libdevice_path.cc | /* Copyright 2016 The TensorFlow Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or a... | /* Copyright 2016 The TensorFlow Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or a... | Fix missing qualifier for std::string | Fix missing qualifier for std::string
PiperOrigin-RevId: 471087779
| C++ | apache-2.0 | google/tsl,google/tsl,google/tsl |
499ac76b7fde15465c9aacd820f3df2787e17b2b | src/bench/Examples.cpp | src/bench/Examples.cpp | // Copyright (c) 2015 The Bitcoin Core developers
// Copyright (c) 2015-2018 The Bitcoin Unlimited developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "bench.h"
#include "main.h"
#include "utiltime.h"
// Sanity ... | // Copyright (c) 2015 The Bitcoin Core developers
// Copyright (c) 2015-2018 The Bitcoin Unlimited developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "bench.h"
#include "utiltime.h"
// Sanity test: this should ... | Remove useless include from Example.cpp | Remove useless include from Example.cpp
| C++ | mit | Justaphf/BitcoinUnlimited,Justaphf/BitcoinUnlimited,BitcoinUnlimited/BitcoinUnlimited,BitcoinUnlimited/BitcoinUnlimited,Justaphf/BitcoinUnlimited,BitcoinUnlimited/BitcoinUnlimited,BitcoinUnlimited/BitcoinUnlimited,Justaphf/BitcoinUnlimited,BitcoinUnlimited/BitcoinUnlimited,Justaphf/BitcoinUnlimited,BitcoinUnlimited/Bit... |
b201e93f018fc9e5b964053a85685d38cec6f841 | lib/Frontend/ChainedDiagnosticConsumer.cpp | lib/Frontend/ChainedDiagnosticConsumer.cpp | //===- ChainedDiagnosticConsumer.cpp - Chain Diagnostic Clients -*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... | //===- ChainedDiagnosticConsumer.cpp - Chain Diagnostic Clients -----------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... | Remove spurious mode marker from .cpp file. | Remove spurious mode marker from .cpp file.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@166915 91177308-0d34-0410-b5e6-96231b3b80d8
| C++ | apache-2.0 | llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/cl... |
551bb12416c88ee322b363348bc4e15615daeed6 | linux/main.cpp | linux/main.cpp | /**
* @file main.cpp
* @author Volodymyr Shymanskyy
* @license This project is released under the MIT License (MIT)
* @copyright Copyright (c) 2015 Volodymyr Shymanskyy
* @date Mar 2015
* @brief
*/
//#define BLYNK_DEBUG
#define BLYNK_PRINT stdout
#ifdef RASPBERRY
#include <BlynkApiWiringPi... | /**
* @file main.cpp
* @author Volodymyr Shymanskyy
* @license This project is released under the MIT License (MIT)
* @copyright Copyright (c) 2015 Volodymyr Shymanskyy
* @date Mar 2015
* @brief
*/
//#define BLYNK_DEBUG
#define BLYNK_PRINT stdout
#ifdef RASPBERRY
#include <BlynkApiWiringPi... | Add timer to Linux example | Add timer to Linux example
| C++ | mit | blynkkk/blynk-library,blynkkk/blynk-library,blynkkk/blynk-library,blynkkk/blynk-library,blynkkk/blynk-library |
48bd836a7e6582ef15eac231624c0ae15a541165 | media/base/run_all_unittests.cc | media/base/run_all_unittests.cc | // Copyright (c) 2011 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 "base/test/test_suite.h"
#include "media/base/media.h"
int main(int argc, char** argv) {
base::TestSuite suite(argc, argv);
media::Init... | // Copyright (c) 2012 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 "base/at_exit.h"
#include "base/command_line.h"
#include "base/logging.h"
#include "base/test/test_suite.h"
#include "media/base/media.h"
cl... | Initialize logging early enough to see VLOGs emitted by InitializeMediaLibraryForTesting(). (specifically, this makes ffmpeg_stubs.cc VLOGs actually get emitted if -v=1 is specified) | Initialize logging early enough to see VLOGs emitted by InitializeMediaLibraryForTesting().
(specifically, this makes ffmpeg_stubs.cc VLOGs actually get emitted if -v=1 is specified)
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/9320048
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@120345 003... | C++ | bsd-3-clause | ropik/chromium,adobe/chromium,adobe/chromium,yitian134/chromium,yitian134/chromium,ropik/chromium,ropik/chromium,gavinp/chromium,yitian134/chromium,gavinp/chromium,gavinp/chromium,gavinp/chromium,yitian134/chromium,gavinp/chromium,adobe/chromium,adobe/chromium,ropik/chromium,yitian134/chromium,adobe/chromium,ropik/chro... |
9dd55f407212deed542f12b11b9a321ab46229bd | ConnectCallVisitor.cpp | ConnectCallVisitor.cpp | #include "ConnectCallVisitor.h"
bool ConnectCallVisitor::VisitCallExpr(clang::CallExpr *expr)
{
return true;
}
| #include <iostream>
#include "ConnectCallVisitor.h"
namespace
{
bool isQObjectConnect(clang::CallExpr *expr)
{
// These are needed a lot so keep them around
static const clang::StringRef expectedMethodName("connect");
static const clang::StringRef expectedClassName("QObject");
const clang::Decl *calleeDecl... | Add heuristics for finding QObject::connect | Add heuristics for finding QObject::connect
This still doesn't do anything but identify likely connect() calls
| C++ | mit | etaoins/qconnectlint |
2dd8d42d058b32585aeecfafe516a3690930501a | code/RNG.cpp | code/RNG.cpp | #include "RNG.h"
#include "Utils.h"
#include <cmath>
namespace DNest4
{
RNG::RNG()
:uniform(0., 1.)
,normal(0., 1.)
{
}
void RNG::set_seed(unsigned int seed)
{
twister.seed(seed);
}
double RNG::rand()
{
return uniform(twister);
}
double RNG::randn()
{
return normal(twister);
}
double RNG::randh()
{
return po... | #include "RNG.h"
#include "Utils.h"
#include <cmath>
namespace DNest4
{
RNG::RNG()
:uniform(0., 1.)
,normal(0., 1.)
{
}
void RNG::set_seed(unsigned int seed)
{
twister.seed(seed);
}
double RNG::rand()
{
return uniform(twister);
}
double RNG::randn()
{
return normal(twister);
}
double RNG::randh()
{
// t-d... | Use t(nu=2) instead of Cauchy | Use t(nu=2) instead of Cauchy
| C++ | mit | eggplantbren/DNest4,eggplantbren/DNest4,eggplantbren/DNest4,eggplantbren/DNest4,eggplantbren/DNest4 |
f34ca2208cb8607c2ecb0c4115563e996d3412d0 | src/main.cc | src/main.cc | #include "gameboy.h"
#include "cartridge.h"
#include "video/screen.h"
#include "util/log.h"
#include "video/screens/null_screen.h"
#include "video/screens/sfml_screen.h"
int main(int argc, char* argv[]) {
log_set_level(LogLevel::Trace);
if (argc < 2) {
log_error("Please provide a ROM file to run")
... | #include "gameboy.h"
#include "cartridge.h"
#include "video/screen.h"
#include "util/log.h"
#include "video/screens/null_screen.h"
#include "video/screens/sfml_screen.h"
int main(int argc, char* argv[]) {
log_set_level(LogLevel::Debug);
if (argc < 2) {
log_error("Please provide a ROM file to run")
... | Set log level to Debug by default | Set log level to Debug by default
| C++ | bsd-3-clause | jgilchrist/emulator,jgilchrist/emulator,jgilchrist/emulator |
cc8269f526e8ae2004b73151e9152813c3adb8c7 | test/cxa_thread_atexit_test.pass.cpp | test/cxa_thread_atexit_test.pass.cpp | //===--------------------- cxa_thread_atexit_test.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.
//
//===----------------------------------------... | //===--------------------- cxa_thread_atexit_test.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.
//
//===----------------------------------------... | Make test require 'linux' instead of 'linux2' | Make test require 'linux' instead of 'linux2'
git-svn-id: 6a9f6578bdee8d959f0ed58970538b4ab6004734@228073 91177308-0d34-0410-b5e6-96231b3b80d8
| C++ | apache-2.0 | llvm-mirror/libcxxabi,llvm-mirror/libcxxabi,llvm-mirror/libcxxabi,llvm-mirror/libcxxabi,llvm-mirror/libcxxabi |
7129258865f042677974802f9dffb7741a4e8b5d | hexcrypt.cpp | hexcrypt.cpp | #include "ihex.h"
#include <stdlib.h>
int main(int argc, char* argv[])
{
if (argc != 4)
{
std::cerr << argv[0] << " input.hex keyfile output.hex\n"
<< "Encrypts or decrypts the data in an Intel Hex file.\n"
<< "Addresses are unchanged, but checksum is updated.\n";
exit(-1);
}
IntelHex file;
file.Read... | #include "ihex.h"
#include <stdlib.h>
int main(int argc, char* argv[])
{
if (argc != 4)
{
std::cerr << argv[0] << " input.hex keyfile output.hex\n"
"Encrypts or decrypts the data in an Intel Hex file.\n"
"Addresses are unchanged, but checksum is updated.\n\n"
"The [keyfile] is a raw binary file with the ... | Add information about the keyfile "format". | Add information about the keyfile "format".
It's obvious, but even more so when it's written down!
| C++ | mit | pulkomandy/hexcrypt,pulkomandy/hexcrypt |
dd364b1fd1df13aa008dca0bdb8cb3e713a19bd7 | 3RVX/VolumeSlider.cpp | 3RVX/VolumeSlider.cpp | #include "VolumeSlider.h"
#include "Skin.h"
VolumeSlider::VolumeSlider(HINSTANCE hInstance, Settings &settings) :
OSD(hInstance, L"3RVX-VolumeSlider", settings),
_mWnd(hInstance, L"3RVX-VolumeSliderWnd", L"3RVX Volume Slider") {
std::wstring skinXML = settings.SkinXML();
Skin skin(skinXML);
long styles ... | #include "VolumeSlider.h"
#include "Skin.h"
VolumeSlider::VolumeSlider(HINSTANCE hInstance, Settings &settings) :
OSD(hInstance, L"3RVX-VolumeSlider", settings),
_sWnd(hInstance, L"3RVX-VolumeSliderWnd", L"3RVX Volume Slider") {
std::wstring skinXML = settings.SkinXML();
Skin skin(skinXML);
Gdiplus::Bit... | Update for new SliderWnd class | Update for new SliderWnd class
| C++ | bsd-2-clause | Soulflare3/3RVX,Soulflare3/3RVX,malensek/3RVX,malensek/3RVX,malensek/3RVX,Soulflare3/3RVX |
3f33bf1042571c2411c02f1d9cda5f2e470d0e10 | src/mainwindow.cpp | src/mainwindow.cpp | #include "mainwindow.h"
#include "bucketlist.h"
#include <QLabel>
#include <QBoxLayout>
#include <QtWebKit>
#include <QSettings>
#include <QInputDialog>
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent)
{
QWidget *central = new QWidget;
setCentralWidget(central);
QBoxLayout *topLayout = ... | #include "mainwindow.h"
#include "bucketlist.h"
#include <QLabel>
#include <QBoxLayout>
#include <QtWebKit>
#include <QSettings>
#include <QInputDialog>
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent)
{
QWidget *central = new QWidget;
setCentralWidget(central);
QBoxLayout *topLayout = ... | Make widget always fit the view | Make widget always fit the view
| C++ | mit | cornelius/myles,cornelius/myles,cornelius/myles |
245fb8047de356945a811cc054cb7462a69af765 | chromeos/system/devicetype.cc | chromeos/system/devicetype.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 "chromeos/system/devicetype.h"
#include <string>
#include "base/sys_info.h"
namespace chromeos {
namespace {
const char kDeviceType[] = "CHRO... | // 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 "chromeos/system/devicetype.h"
#include <string>
#include "base/sys_info.h"
namespace chromeos {
namespace {
const char kDeviceType[] = "DEVI... | Use the correct lsb key when fetching the CrOS device type. | Use the correct lsb key when fetching the CrOS device type.
This fixes a typo where the wrong key was used. The data is exposed under
a different key.
BUG=341356
Review URL: https://codereview.chromium.org/1220253007
Cr-Commit-Position: 972c6d2dc6dd5efdad1377c0d224e03eb8f276f7@{#337452}
| C++ | bsd-3-clause | chuan9/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,hgl888/chromium-crosswalk,Chilledheart/chromium,Chilledheart/chromium,Just-D/chromium-1,Chilledheart/chromium,Pluto-tv/chromium-crosswalk,axinging/chromium-crosswalk,Just-D/chromium-1,TheTypoMaster/chromium-crosswalk,hgl888/chromium-crosswalk,TheTypoMaster/chro... |
ecdf853441c274fd31abcf4464d0814107ff39b7 | source/main.cpp | source/main.cpp | #include <3ds.h>
#include <stdio.h>
void shutdown3DS()
{
Handle nssHandle = 0;
Result result = srvGetServiceHandle(&nssHandle, "ns:s");
if (result != 0)
return;
// http://3dbrew.org/wiki/NSS:ShutdownAsync
u32 *commandBuffer = getThreadCommandBuffer();
commandBuffer[0] = 0x000E0000;
svcSendSy... | #include <3ds.h>
#include <stdio.h>
// http://3dbrew.org/wiki/NSS:ShutdownAsync
void NSS_ShutdownAsync(void)
{
Handle nssHandle = 0;
Result result = srvGetServiceHandle(&nssHandle, "ns:s");
if (result != 0)
return;
u32 *commandBuffer = getThreadCommandBuffer();
commandBuffer[0] = 0x000E0000;
sv... | Call it NSS_ShutdownAsync instead of shutdown3DS. | Call it NSS_ShutdownAsync instead of shutdown3DS.
| C++ | mit | Asellus/3DS_Quick_Shutdown |
2a650165d530f2c8deb93ccb9f12064f3ab3db61 | firmware/Name.cpp | firmware/Name.cpp | #include "Name.h"
bool Name::init(String name) {
size = name.length() + 1;
data = (uint8_t *) malloc(size);
if (data != NULL) {
uint8_t lastDot = size;
for (uint8_t i = size - 1; i > 0; i--) {
uint8_t c = name.charAt(i - 1);
if (c == '.') ... | #include "Name.h"
bool Name::init(String name) {
size = name.length() + 1;
data = (uint8_t *) malloc(size);
if (data != NULL) {
uint8_t lastDot = size;
for (uint8_t i = size - 1; i > 0; i--) {
uint8_t c = name.charAt(i - 1);
if (c == '.') ... | Correct buffer overflow in match(...) | Correct buffer overflow in match(...) | C++ | mit | mrhornsby/spark-core-mdns,mrhornsby/spark-core-mdns |
aaba193cd4bb76c9aa91fe83aeb250b71f0c4db4 | math/Sphere.cpp | math/Sphere.cpp | #include "./Sphere.hpp"
#include "./misc.hpp"
#include <algorithm>
#include <cmath>
namespace yks {
Optional<float> intersect(const vec3& origin, float radius, const Ray& r) {
const vec3 o = r.origin - origin;
const vec3 v = r.direction;
float t1, t2;
const int solutions = solve_quadratic(dot(v, v), 2*dot(o... | #include "./Sphere.hpp"
#include "./misc.hpp"
#include <algorithm>
#include <cmath>
namespace yks {
Optional<float> intersect(const vec3& origin, float radius, const Ray& r) {
const vec3 o = r.origin - origin;
const vec3 v = r.direction;
float t1, t2;
const int solutions = solve_quadratic(dot(v, v), 2*dot(o... | Remove duplicated call to std::cos | Remove duplicated call to std::cos
| C++ | apache-2.0 | yuriks/libyuriks,yuriks/super-match-5-dx,yuriks/libyuriks,yuriks/super-match-5-dx |
c89fd3af0ee909eb924653058e8598e8b47bc279 | test/Driver/warning-options.cpp | test/Driver/warning-options.cpp | // RUN: %clang -### -Wlarge-by-value-copy %s 2>&1 | FileCheck -check-prefix=LARGE_VALUE_COPY_DEFAULT %s
// LARGE_VALUE_COPY_DEFAULT: -Wlarge-by-value-copy=64
// RUN: %clang -### -Wlarge-by-value-copy=128 %s 2>&1 | FileCheck -check-prefix=LARGE_VALUE_COPY_JOINED %s
// LARGE_VALUE_COPY_JOINED: -Wlarge-by-value-copy=128
... | // RUN: %clang -### -Wlarge-by-value-copy %s 2>&1 | FileCheck -check-prefix=LARGE_VALUE_COPY_DEFAULT %s
// LARGE_VALUE_COPY_DEFAULT: -Wlarge-by-value-copy=64
// RUN: %clang -### -Wlarge-by-value-copy=128 %s 2>&1 | FileCheck -check-prefix=LARGE_VALUE_COPY_JOINED %s
// LARGE_VALUE_COPY_JOINED: -Wlarge-by-value-copy=128
... | Add a test for -Warc-abi as requested by Fariborz. | Add a test for -Warc-abi as requested by Fariborz.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@166540 91177308-0d34-0410-b5e6-96231b3b80d8
| C++ | apache-2.0 | apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/cl... |
2063990eaf98b2e0aff0d28aad309d3629e57160 | src/rdb_protocol/configured_limits.cc | src/rdb_protocol/configured_limits.cc | #include "rdb_protocol/configured_limits.hpp"
#include "rdb_protocol/wire_func.hpp"
#include "rdb_protocol/func.hpp"
namespace ql {
configured_limits_t
from_optargs(const std::map<std::string, wire_func_t> &arguments)
{
auto p = arguments.find("arrayLimit");
if (p != arguments.end()) {
// Fake an envir... | #include "rdb_protocol/configured_limits.hpp"
#include "rdb_protocol/wire_func.hpp"
#include "rdb_protocol/func.hpp"
namespace ql {
configured_limits_t
from_optargs(const std::map<std::string, wire_func_t> &arguments)
{
auto p = arguments.find("arrayLimit");
if (p != arguments.end()) {
// Fake an envir... | Expand on why we need a fake, here. | Expand on why we need a fake, here.
| C++ | agpl-3.0 | spblightadv/rethinkdb,ajose01/rethinkdb,elkingtonmcb/rethinkdb,rrampage/rethinkdb,sontek/rethinkdb,bchavez/rethinkdb,mcanthony/rethinkdb,losywee/rethinkdb,greyhwndz/rethinkdb,tempbottle/rethinkdb,grandquista/rethinkdb,spblightadv/rethinkdb,matthaywardwebdesign/rethinkdb,Qinusty/rethinkdb,losywee/rethinkdb,RubenKelevra/... |
a4d69a35ba389303a702621b7b6cb186a7af93c9 | src/temporary.cpp | src/temporary.cpp | //===---------------------------- temporary.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.
//
//===----------------------------------------... | //===---------------------------- temporary.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.
//
//===----------------------------------------... | Add a little paranoia for testing purposes. | Add a little paranoia for testing purposes.
git-svn-id: 6a9f6578bdee8d959f0ed58970538b4ab6004734@149157 91177308-0d34-0410-b5e6-96231b3b80d8
| C++ | apache-2.0 | llvm-mirror/libcxxabi,llvm-mirror/libcxxabi,llvm-mirror/libcxxabi,llvm-mirror/libcxxabi,llvm-mirror/libcxxabi |
2a43e2de618a304175f653fc8df2c62a9515a299 | firmware/main/main.cpp | firmware/main/main.cpp | /*
* main.cpp
*
* Copyright (C) 2018 [ A Legge Up ]
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
#include <stdio.h>
#include "HardwareConfig.h"
#include "AnimationTask.h"
extern "C" void app_main()
{
HardwareConfig hardwareCo... | /*
* main.cpp
*
* Copyright (C) 2018 [ A Legge Up ]
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
#include <stdio.h>
#include "HardwareConfig.h"
#include "AnimationTask.h"
extern "C" void app_main()
{
HardwareConfig hardwareCo... | Add a throw-away parameter for task start to remove warning | Add a throw-away parameter for task start to remove warning
| C++ | mit | ALeggeUp/confagrid,ALeggeUp/confagrid,ALeggeUp/confagrid,ALeggeUp/confagrid,ALeggeUp/confagrid |
097c8eaecd5910596b6370684b9c0201d8b50ed1 | test/rssitem.cpp | test/rssitem.cpp | #include "rssitem.h"
#include "3rd-party/catch.hpp"
#include "cache.h"
#include "configcontainer.h"
using namespace newsboat;
TEST_CASE("RssItem::sort_flags() cleans up flags", "[rss]")
{
ConfigContainer cfg;
Cache rsscache(":memory:", &cfg);
RssItem item(&rsscache);
SECTION("Repeated letters do not erase other... | #include "rssitem.h"
#include "3rd-party/catch.hpp"
#include "cache.h"
#include "configcontainer.h"
using namespace newsboat;
TEST_CASE("RssItem::sort_flags() cleans up flags", "[RssItem]")
{
ConfigContainer cfg;
Cache rsscache(":memory:", &cfg);
RssItem item(&rsscache);
SECTION("Repeated letters do not erase o... | Mark RssItem tests with appropriate tag | Mark RssItem tests with appropriate tag
| C++ | mit | der-lyse/newsboat,der-lyse/newsboat,newsboat/newsboat,der-lyse/newsboat,der-lyse/newsboat,der-lyse/newsboat,der-lyse/newsboat,newsboat/newsboat,der-lyse/newsboat,der-lyse/newsboat,newsboat/newsboat,newsboat/newsboat,newsboat/newsboat,newsboat/newsboat,newsboat/newsboat,newsboat/newsboat |
fb662bb290930a1f238d9893177c2c3701ee1cb5 | src/main.cpp | src/main.cpp | #include "Renderer.hpp"
#include "Window.hpp"
#include <cstring>
#include <iostream>
#include "Particle.png.hpp"
int main(int argc, char* argv[]) {
Window window;
bool measure = false;
if (argc > 1 && strcmp(argv[1], "measure") == 0) {
std::cout << "Measuring..." << std::endl;
measure ... | #include "Renderer.hpp"
#include "Window.hpp"
#include <cstring>
#include <iostream>
#include "Particle.png.hpp"
int main(int argc, char* argv[]) {
Window window;
bool measure = false;
if (argc > 1 && strcmp(argv[1], "measure") == 0) {
std::cout << "Measuring..." << std::endl;
measure ... | Use constant delta time when in measure mode | Use constant delta time when in measure mode
| C++ | mit | Chainsawkitten/AsyncCompute,Chainsawkitten/ParticlesGLVulkan |
2cbd4185e11a24609bff23e6c7e35009e5bc8f69 | test/asan/TestCases/interception_failure_test.cc | test/asan/TestCases/interception_failure_test.cc | // If user provides his own libc functions, ASan doesn't
// intercept these functions.
// RUN: %clangxx_asan -O0 %s -o %t && %run %t 2>&1 | FileCheck %s
// RUN: %clangxx_asan -O1 %s -o %t && %run %t 2>&1 | FileCheck %s
// RUN: %clangxx_asan -O2 %s -o %t && %run %t 2>&1 | FileCheck %s
// RUN: %clangxx_asan -O3 %s -o %t... | // If user provides his own libc functions, ASan doesn't
// intercept these functions.
// RUN: %clangxx_asan -O0 %s -o %t && %run %t 2>&1 | FileCheck %s
// RUN: %clangxx_asan -O1 %s -o %t && %run %t 2>&1 | FileCheck %s
// RUN: %clangxx_asan -O2 %s -o %t && %run %t 2>&1 | FileCheck %s
// RUN: %clangxx_asan -O3 %s -o %t... | Add missing header in a test. | [asan] Add missing header in a test.
git-svn-id: c199f293c43da69278bea8e88f92242bf3aa95f7@286191 91177308-0d34-0410-b5e6-96231b3b80d8
| C++ | apache-2.0 | llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt |
f5c6adadf754c3507b0e2743a86bde4bba56f3ce | test/TestIOMidi/tst_iomidi.cpp | test/TestIOMidi/tst_iomidi.cpp | #include "iomidi.h"
#include "db.h"
#include <QtTest>
class TestIOMIdi : public QObject
{
Q_OBJECT
private slots:
void test_handle();
void test_clientId();
void test_portId();
private:
IOMidi io;
};
void TestIOMIdi::test_handle()
{
snd_seq_t* seq = io.handle();
QVERIFY(seq);
snd_se... | #include "iomidi.h"
#include "db.h"
#include <QtTest>
class TestIOMIdi : public QObject
{
Q_OBJECT
private slots:
void initTestCase();
void test_handle();
void test_clientId();
void test_portId();
private:
IOMidi* io;
};
void TestIOMIdi::initTestCase() {
io = nullptr;
try {
... | Fix breaking tests when sequencer can not be opened | Fix breaking tests when sequencer can not be opened
| C++ | mit | charlesfleche/lpd8-editor,charlesfleche/lpd8-editor |
c2e2173356b05b9ddbabe835af20cb31f601ad56 | src/fcmt/ign_nodes/examples/client/main.cpp | src/fcmt/ign_nodes/examples/client/main.cpp | #include <iostream>
#include "ignition/transport.hh"
#include "fcmt/ign_nodes/examples/proto/echo.pb.h"
int main(int argc, char *argv[]) {
auto i = 0;
while (true) {
ignition::transport::Node node;
fcmt::ign_nodes::examples::proto::EchoRequest request;
request.set_value(i++);
fcmt::ign_nodes::exa... | #include <iostream>
#include "ignition/transport.hh"
#include "fcmt/ign_nodes/examples/proto/echo.pb.h"
int main(int argc, char *argv[]) {
auto i = 0;
ignition::transport::Node node;
while (true) {
fcmt::ign_nodes::examples::proto::EchoRequest request;
request.set_value(i++);
fcmt::ign_nodes::examp... | Create node once in ign_nodes_examples_client | Create node once in ign_nodes_examples_client
| C++ | mit | First-Commit/first_commit,First-Commit/first_commit |
078dd9752d27dde7f4e05aa70d47ce5324dc9ac8 | test/std/input.output/stream.buffers/streambuf/streambuf.protected/streambuf.put.area/pbump2gig.pass.cpp | test/std/input.output/stream.buffers/streambuf/streambuf.protected/streambuf.put.area/pbump2gig.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.
//
//===----------------------------------------... | //===----------------------------------------------------------------------===//
//
// 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.
//
//===----------------------------------------... | Add a catch for std::length_error for the case where the string can't handle 2GB. (like say 32-bit big-endian) | Add a catch for std::length_error for the case where the string can't handle 2GB. (like say 32-bit big-endian)
git-svn-id: 756ef344af921d95d562d9e9f9389127a89a6314@325147 91177308-0d34-0410-b5e6-96231b3b80d8
| C++ | apache-2.0 | llvm-mirror/libcxx,llvm-mirror/libcxx,llvm-mirror/libcxx,llvm-mirror/libcxx,llvm-mirror/libcxx |
dc6408abf61cd389a2ad892a5bedc32c2074bab1 | src/rtcmix/rtsetoutput.cpp | src/rtcmix/rtsetoutput.cpp | /* RTcmix - Copyright (C) 2000 The RTcmix Development Team
See ``AUTHORS'' for a list of contributors. See ``LICENSE'' for
the license to this software and for a DISCLAIMER OF ALL WARRANTIES.
*/
#include <RTcmix.h>
#include <Instrument.h>
#include <ugens.h>
int Instrument::rtsetoutput(float start, float dur, I... | /* RTcmix - Copyright (C) 2000 The RTcmix Development Team
See ``AUTHORS'' for a list of contributors. See ``LICENSE'' for
the license to this software and for a DISCLAIMER OF ALL WARRANTIES.
*/
#include <RTcmix.h>
#include <Instrument.h>
#include <ugens.h>
int Instrument::rtsetoutput(float start, float dur, I... | Add code to catch NSAMPS size wraparound. | Add code to catch NSAMPS size wraparound.
| C++ | apache-2.0 | RTcmix/RTcmix,RTcmix/RTcmix,RTcmix/RTcmix,RTcmix/RTcmix,RTcmix/RTcmix,RTcmix/RTcmix |
b932546dba9eb0ed1bf82a5e798521069cc16234 | qt/TangramQt/main.cpp | qt/TangramQt/main.cpp | #include "mainwindow.h"
#include <QApplication>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
MainWindow w;
w.show();
return a.exec();
}
| #include "mainwindow.h"
#include <QApplication>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
std::locale::global( std::locale( "C" ) );
MainWindow w;
w.show();
return a.exec();
}
| Set local to C. Maybe not the best longterm solution. | Set local to C. Maybe not the best longterm solution.
| C++ | mit | quitejonny/tangram-es,quitejonny/tangram-es,quitejonny/tangram-es,quitejonny/tangram-es,quitejonny/tangram-es,quitejonny/tangram-es |
c01526e39e6df252d4de7fa831d0d5b384a3af06 | test/CodeGenCXX/debug-info-thunk.cpp | test/CodeGenCXX/debug-info-thunk.cpp | // RUN: %clang_cc1 %s -g -S -emit-llvm -o - | FileCheck %s
// FIXME: Failing on i686.
// XFAIL: *
// RUN: %clang_cc1 -triple i686-linux %s -g -S -emit-llvm -o - | FileCheck %s
struct A {
virtual void f();
};
struct B {
virtual void f();
};
struct C : A, B {
virtual void f();
};
void C::f() { }
// CHECK: [ D... | // RUN: %clang_cc1 %s -g -S -emit-llvm -o - | FileCheck %s
struct A {
virtual void f();
};
struct B {
virtual void f();
};
struct C : A, B {
virtual void f();
};
void C::f() { }
// CHECK: [ DW_TAG_subprogram ] [line 15] [def] [_ZThn{{4|8}}_N1C1fEv]
| Fix test suppressed in r166683 on 32-bit Linux | Fix test suppressed in r166683 on 32-bit Linux
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@166758 91177308-0d34-0410-b5e6-96231b3b80d8
| C++ | apache-2.0 | apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/cl... |
42751e34f6c7e4fcf1ea6b67b078d1780c046c56 | test/CodeGenCXX/linetable-virtual-variadic.cpp | test/CodeGenCXX/linetable-virtual-variadic.cpp | // RUN: %clang_cc1 -triple x86_64-apple-darwin -emit-llvm -debug-info-kind=line-tables-only %s -o - | FileCheck %s
// Crasher for PR22929.
class Base {
virtual void VariadicFunction(...);
};
class Derived : public virtual Base {
virtual void VariadicFunction(...);
};
void Derived::VariadicFunction(...) { }
// CH... | // RUN: %clang_cc1 -triple x86_64-apple-darwin -emit-llvm -debug-info-kind=line-tables-only %s -o - | FileCheck %s
// Crasher for PR22929.
class Base {
virtual void VariadicFunction(...);
};
class Derived : public virtual Base {
virtual void VariadicFunction(...);
};
void Derived::VariadicFunction(...) { }
// CH... | Revert r302476 "Update testcase for upstream LLVM changes." | Revert r302476 "Update testcase for upstream LLVM changes."
That test update was for r302469, which was reverted in r302533 due to PR32977.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@302542 91177308-0d34-0410-b5e6-96231b3b80d8
| C++ | apache-2.0 | llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/cl... |
469076bed70933a966ee580a4606a4ca0b80e709 | tests/gamemodetest.cpp | tests/gamemodetest.cpp | #include "dota2api/gamemode.cpp"
#include "gtest/gtest.h"
TEST(GameMode, gameModeFromInt)
{
EXPECT_EQ
(
dota2::GameMode::Unknown,
dota2::gameModeFromInt(-1)
);
for(const auto &mode : dota2::gameModes)
{
EXPECT_EQ
(
mode.second,
d... | #include "dota2api/gamemode.hpp"
#include "gtest/gtest.h"
TEST(GameMode, gameModeFromInt)
{
EXPECT_EQ
(
dota2::GameMode::Unknown,
dota2::gameModeFromInt(-1)
);
for(const auto &mode : dota2::gameModes)
{
EXPECT_EQ
(
mode.second,
d... | Include header file instead of cpp | Include header file instead of cpp
| C++ | apache-2.0 | UnrealQuester/dota2Cmd |
8cd71a952482840639b9f18da2ae59082135e2ee | source/kobjects.cpp | source/kobjects.cpp | #include "kobjects.h"
#include "constants.h"
#define PAGE_SIZE 0x1000
KCodeSet* FindTitleCodeSet(u64 title_id)
{
for (unsigned kproc_index = 0; kproc_index < kproc_num; kproc_index++) {
KCodeSet* curr_codeset = (KCodeSet*)(kproc_start + kproc_size * kproc_index + kproc_codeset_offset);
if (curr_co... | #include "kobjects.h"
#include "constants.h"
#define PAGE_SIZE 0x1000
KCodeSet* FindTitleCodeSet(u64 title_id)
{
for (unsigned kproc_index = 0; kproc_index < kproc_num; kproc_index++) {
KCodeSet* curr_codeset = *(KCodeSet**)(kproc_start + kproc_size * kproc_index + kproc_codeset_offset);
if (curr_... | Fix bug where we were using a KCodeSet** as a KCodeSet* in codeset finding | Fix bug where we were using a KCodeSet** as a KCodeSet* in codeset finding
Damn pointers, how do they work?!
| C++ | apache-2.0 | archshift/service-patch,archshift/service-patch |
d126412b05adbbc1e24895603cf9fa29c19ad8ec | content/test/layouttest_support.cc | content/test/layouttest_support.cc | // Copyright (c) 2012 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/public/test/layouttest_support.h"
#include "base/callback.h"
#include "base/lazy_instance.h"
#include "content/renderer/render_view... | // Copyright (c) 2012 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/public/test/layouttest_support.h"
#include "base/callback.h"
#include "base/lazy_instance.h"
#include "content/renderer/render_view... | Add missing lazy instance initializer | Add missing lazy instance initializer
BUG=none
R=marja@chromium.org
Review URL: https://codereview.chromium.org/11536002
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@172318 0039d316-1c4b-4281-b951-d872f2087c98
| C++ | bsd-3-clause | dednal/chromium.src,fujunwei/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,jaruba/chromium.src,M4sse/chromium.src,Chilledheart/chromium,littlstar/chromium.src,mohamed--abdel-maksoud/chromium.src,patrickm/chromium.src,mogoweb/chromium-crosswalk,ondra-novak/chromium.src,fujunwei/chromium-crosswalk,timopulkkinen/Bu... |
9516babc4a834ec72508b35fb86741f9254f5419 | net/disk_cache/cache_util_posix.cc | net/disk_cache/cache_util_posix.cc | // Copyright (c) 2006-2008 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 "net/disk_cache/cache_util.h"
#include "base/file_util.h"
#include "base/logging.h"
#include "base/string_util.h"
namespace disk_cache... | // Copyright (c) 2006-2008 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 "net/disk_cache/cache_util.h"
#include "base/file_util.h"
#include "base/logging.h"
#include "base/string_util.h"
namespace disk_cache... | Fix DeleteCache on POSIX. It wasn't successfully deleting before. | Fix DeleteCache on POSIX. It wasn't successfully deleting before.
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@2468 0039d316-1c4b-4281-b951-d872f2087c98
| C++ | bsd-3-clause | mogoweb/chromium-crosswalk,patrickm/chromium.src,robclark/chromium,jaruba/chromium.src,Pluto-tv/chromium-crosswalk,ondra-novak/chromium.src,nacl-webkit/chrome_deps,Chilledheart/chromium,mogoweb/chromium-crosswalk,ondra-novak/chromium.src,ChromiumWebApps/chromium,hujiajie/pa-chromium,ondra-novak/chromium.src,keishi/chro... |
7045b782155e004ced6c27fc36696e7bd018980f | src/exceptions.cpp | src/exceptions.cpp | #include "exceptions.hpp"
#include <nan.h>
#include <gfcpp/GemfireCppCache.hpp>
#include <sstream>
void ThrowGemfireException(const gemfire::Exception & e) {
std::stringstream errorMessageStream;
errorMessageStream << e.getName() << ": " << e.getMessage();
e.printStackTrace();
NanThrowError(errorMessageStrea... | #include "exceptions.hpp"
#include <nan.h>
#include <gfcpp/GemfireCppCache.hpp>
#include <sstream>
void ThrowGemfireException(const gemfire::Exception & e) {
std::stringstream errorMessageStream;
errorMessageStream << e.getName() << ": " << e.getMessage();
NanThrowError(errorMessageStream.str().c_str());
}
| Stop printing stack trace noise | Stop printing stack trace noise
| C++ | bsd-2-clause | mross-pivotal/node-gemfire,gemfire/node-gemfire,gemfire/node-gemfire,mross-pivotal/node-gemfire,mross-pivotal/node-gemfire,gemfire/node-gemfire,gemfire/node-gemfire,gemfire/node-gemfire,mross-pivotal/node-gemfire,mross-pivotal/node-gemfire,mross-pivotal/node-gemfire,gemfire/node-gemfire |
47706f364a5a08eb473bbefbef35d03275aa2862 | src/gpu/GrCacheID.cpp | src/gpu/GrCacheID.cpp | /*
* Copyright 2012 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "GrTypes.h"
#include "SkThread.h" // for sk_atomic_inc
// This used to be a global scope, but we got a warning about unused variable
// so we moved it into her... | /*
* Copyright 2012 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "GrTypes.h"
#include "SkThread.h" // for sk_atomic_inc
// Well, the dummy_ "fix" caused a warning on windows, so hiding all of it
// until we can find a univer... | Revert r7595 due to housekeeper warning-as-error. | Revert r7595 due to housekeeper warning-as-error.
git-svn-id: e8541e15acce502a64c929015570ad1648e548cd@7596 2bbb7eff-a529-9590-31e7-b0007b416f81
| C++ | bsd-3-clause | Frankie-666/color-emoji.skia,Hankuo/color-emoji.skia,Hankuo/color-emoji.skia,MatChung/color-emoji.skia,MatChung/color-emoji.skia,hbwhlklive/color-emoji.skia,hbwhlklive/color-emoji.skia,Frankie-666/color-emoji.skia,Frankie-666/color-emoji.skia,Hankuo/color-emoji.skia,hbwhlklive/color-emoji.skia,MatChung/color-emoji.skia... |
f118cb417ae9163674d0a89777489a73bc6459c0 | tests/wrappers/SoundBufferAdapter.cpp | tests/wrappers/SoundBufferAdapter.cpp | #include "aquila/source/generator/SineGenerator.h"
#include "aquila/wrappers/SoundBufferAdapter.h"
#include "UnitTest++/UnitTest++.h"
SUITE(SoundBufferAdapter)
{
TEST(NumSamples)
{
Aquila::SineGenerator generator(128);
generator.setAmplitude(1).setFrequency(8).generate(64);
Aquila::Sou... | #include "aquila/source/generator/SineGenerator.h"
#include "aquila/wrappers/SoundBufferAdapter.h"
#include "UnitTest++/UnitTest++.h"
SUITE(SoundBufferAdapter)
{
TEST(NumSamples)
{
Aquila::SineGenerator generator(128);
generator.setAmplitude(1).setFrequency(8).generate(64);
Aquila::Sou... | Check that sample frequencies agree between original generator and buffer. | Check that sample frequencies agree between original generator and buffer.
| C++ | apache-2.0 | synkarae/aquila,synkarae/Quasar,tempbottle/aquila,zsiciarz/aquila,zsiciarz/aquila,tempbottle/aquila,sav6622/aquila,sav6622/aquila,zsiciarz/aquila,synkarae/Quasar,Aldor007/aquila,sav6622/aquila,zsiciarz/aquila,Aldor007/aquila,tempbottle/aquila,synkarae/aquila,synkarae/aquila,Aldor007/aquila,synkarae/Quasar |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.