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 |
|---|---|---|---|---|---|---|---|---|---|
2dcfda20773ca1f71339034353bc5858386419b1 | test/unit/math/rev/scal/fun/is_any_nan_test.cpp | test/unit/math/rev/scal/fun/is_any_nan_test.cpp | #include <stan/math/rev/scal.hpp>
#include <gtest/gtest.h>
#include <test/unit/math/rev/scal/util.hpp>
#include <limits>
TEST(MathFunctions, is_any_nan_variadic_rev) {
using stan::math::is_any_nan;
double dbl_inf = std::numeric_limits<double>::infinity();
double dbl_nan = std::numeric_limits<double>::quiet_NaN(... | #include <stan/math/rev/scal.hpp>
#include <gtest/gtest.h>
#include <test/unit/math/rev/scal/util.hpp>
#include <test/unit/math/rev/scal/fun/util.hpp>
#include <limits>
TEST(MathFunctions, is_any_nan_variadic_rev) {
using stan::math::is_any_nan;
double dbl_inf = std::numeric_limits<double>::infinity();
double d... | Fix includes for AVAR typedef. | Fix includes for AVAR typedef.
| C++ | bsd-3-clause | stan-dev/math,stan-dev/math,stan-dev/math,stan-dev/math,stan-dev/math,stan-dev/math,stan-dev/math,stan-dev/math,stan-dev/math |
a7bf688d859a0500c77ab89d58cafc25b537fab5 | libproxy/module_wpad.cpp | libproxy/module_wpad.cpp | #include "module_wpad.hpp"
using namespace com::googlecode::libproxy;
static const char *DEFAULT_WPAD_ORDER[] = {
"wpad_dhcp",
"wpad_slp",
"wpad_dns",
"wpad_dnsdevolution",
NULL
};
bool wpad_module::operator<(const wpad_module& module) const {
for (int i=0 ; DEFAULT_WPAD_ORDER[i] ; i++) {
if (module.get_id() ... | #include "module_wpad.hpp"
using namespace com::googlecode::libproxy;
static const char *DEFAULT_WPAD_ORDER[] = {
"wpad_dhcp",
"wpad_slp",
"wpad_dns_srv",
"wpad_dns_txt",
"wpad_dns_alias",
NULL
};
bool wpad_module::operator<(const wpad_module& module) const {
for (int i=0 ; DEFAULT_WPAD_ORDER[i] ; i++) {
if ... | Fix wpad ordering table after wpad_dns -> wpad_dns_alias rename | Fix wpad ordering table after wpad_dns -> wpad_dns_alias rename | C++ | lgpl-2.1 | binarycrusader/libproxy,libproxy/libproxy,anonymous2ch/libproxy,binarycrusader/libproxy,binarycrusader/libproxy,cicku/libproxy,cicku/libproxy,anonymous2ch/libproxy,horar/libproxy,binarycrusader/libproxy,cicku/libproxy,horar/libproxy,horar/libproxy,anonymous2ch/libproxy,maxinbjohn/libproxy,maxinbjohn/libproxy,libproxy/l... |
50e19bcb8df1b1ed5b488acbd8e93c34d2826099 | test/CodeGenCXX/array-construction.cpp | test/CodeGenCXX/array-construction.cpp | // REQUIRES: x86-registered-target,x86-64-registered-target
// RUN: %clang_cc1 -triple x86_64-apple-darwin -std=c++11 -S %s -o %t-64.s
// RUN: FileCheck -check-prefix CHECK-LP64 --input-file=%t-64.s %s
// RUN: %clang_cc1 -triple i386-apple-darwin -std=c++11 -S %s -o %t-32.s
// RUN: FileCheck -check-prefix CHECK-LP32 --... | // RUN: %clang_cc1 -triple x86_64-apple-darwin -std=c++11 -emit-llvm %s -o - | \
// RUN: FileCheck %s
// RUN: %clang_cc1 -triple i386-apple-darwin -std=c++11 -emit-llvm %s -o - | \
// RUN: FileCheck %s
extern "C" int printf(...);
static int count;
static float fcount;
class xpto {
public:
xpto() : i(count++), f(fc... | Check IR in this test. | Check IR in this test.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@196276 91177308-0d34-0410-b5e6-96231b3b80d8
| C++ | apache-2.0 | 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/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-cl... |
203641551871dac5b42eedb949bc68435d7291e3 | MultipleSenderTest.cpp | MultipleSenderTest.cpp | #include "stdafx.h"
#include "MultipleSenderTest.h"
#include "EventSender.h"
class MultiEventA:
public virtual EventReceiver
{
public:
virtual void EventA(void) = 0;
};
class MultiEventB:
public virtual EventReceiver
{
public:
virtual void EventB(void) = 0;
};
class MultiSender:
public EventSender<MultiEve... | #include "stdafx.h"
#include "MultipleSenderTest.h"
#include "EventSender.h"
class MultiEventA:
public virtual EventReceiver
{
public:
virtual void Event(void) = 0;
};
class MultiEventB:
public virtual EventReceiver
{
public:
virtual void Event(void) = 0;
};
class MultiSender:
public EventSender<MultiEvent... | Test amended to ensure that potential naming collisions do not necessarily affect execution | Test amended to ensure that potential naming collisions do not necessarily affect execution
| C++ | apache-2.0 | leapmotion/autowiring,codemercenary/autowiring,codemercenary/autowiring,codemercenary/autowiring,leapmotion/autowiring,codemercenary/autowiring,leapmotion/autowiring,leapmotion/autowiring,codemercenary/autowiring,leapmotion/autowiring,leapmotion/autowiring,codemercenary/autowiring |
843efd5d5dac7912803d5225a4c92b87bc815df3 | test/CodeGenCXX/debug-info-vla-range.cpp | test/CodeGenCXX/debug-info-vla-range.cpp | // RUN: %clang_cc1 -emit-llvm -g -triple x86_64-apple-darwin %s -o - | FileCheck %s
// CHECK: DW_TAG_subrange_type
struct StructName {
int member[];
};
struct StructName SN;
| // RUN: %clang_cc1 -emit-llvm -g -triple x86_64-apple-darwin %s -o - | FileCheck %s
// CHECK: metadata !{i32 {{.*}}, i64 1, i64 0} ; [ DW_TAG_subrange_type ]
struct StructName {
int member[];
};
struct StructName SN;
| Check that we have an unknown upper bound range for our flexible array members. | Check that we have an unknown upper bound range for our flexible array members.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@157305 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,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/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-cl... |
87db45b1f3e5ed9a10ea861b385b867c81cd96e1 | hsengine/iorequest.cpp | hsengine/iorequest.cpp | #include "iorequest.h"
#include <QtDebug>
#include "event.h"
#include "actions/action.h"
IORequest::IORequest(Player* source, IORequest::RequestType type, int refCount) :
QObject(NULL),
mRefCount(refCount),
m_source(source),
m_type(type),
m_response(NULL)
{
}
IORequest::~IORequest()
{
}
IORequest... | #include "iorequest.h"
#include <QtDebug>
#include "event.h"
#include "actions/action.h"
IORequest::IORequest(Player* source, IORequest::RequestType type, int refCount) :
QObject(NULL),
mRefCount(refCount),
m_source(source),
m_type(type),
m_response(NULL)
{
}
IORequest::~IORequest()
{
}
IORequest... | Fix memory leak: IORequest needed 3 calls (instead of 2) to deRef to delete itself | Fix memory leak: IORequest needed 3 calls (instead of 2) to deRef to delete itself
| C++ | mit | dtaralla/hearthstone,dtaralla/hearthstone,dtaralla/hearthstone |
d82c14b0bfe1c136c4d03bed1abe2a0a77a42c02 | RawSpeed/BlackArea.cpp | RawSpeed/BlackArea.cpp | #include "StdAfx.h"
#include "BlackArea.h"
/*
RawSpeed - RAW file decoder.
Copyright (C) 2009 Klaus Post
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
... | #include "StdAfx.h"
#include "BlackArea.h"
/*
RawSpeed - RAW file decoder.
Copyright (C) 2009 Klaus Post
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
... | Fix orientation of black areas (value left uninitialized). | Fix orientation of black areas (value left uninitialized).
git-svn-id: 04e88ac4940b0408b73cd6f458a224a262abaaff@355 ec705bc8-faf6-4f9b-9aff-b4916e9bedc3
| C++ | lgpl-2.1 | jbuchbinder/rawspeed,jbuchbinder/rawspeed |
0ec5561b4ee45255fc524fe22711f46f7d26aff3 | modules/features2d/perf/perf_agast.cpp | modules/features2d/perf/perf_agast.cpp | #include "perf_precomp.hpp"
using namespace std;
using namespace cv;
using namespace perf;
using std::tr1::make_tuple;
using std::tr1::get;
CV_ENUM(AgastType, AgastFeatureDetector::AGAST_5_8, AgastFeatureDetector::AGAST_7_12d,
AgastFeatureDetector::AGAST_7_12s, AgastFeatureDetector::OAST_9_16)
typ... | #include "perf_precomp.hpp"
using namespace std;
using namespace cv;
using namespace perf;
using std::tr1::make_tuple;
using std::tr1::get;
CV_ENUM(AgastType, AgastFeatureDetector::AGAST_5_8, AgastFeatureDetector::AGAST_7_12d,
AgastFeatureDetector::AGAST_7_12s, AgastFeatureDetector::OAST_9_16)
typ... | Adjust AGAST perftest to be at parity (better) with FAST ones. | Adjust AGAST perftest to be at parity (better) with FAST ones.
| C++ | apache-2.0 | opencv/opencv,opencv/opencv,opencv/opencv,opencv/opencv,opencv/opencv,opencv/opencv,opencv/opencv,opencv/opencv,opencv/opencv,opencv/opencv |
2522ae416e0e9bdd7f49db1c4164fd21d8f52466 | lib/src/filename/ast/filename-node-conditional.cpp | lib/src/filename/ast/filename-node-conditional.cpp | #include "filename/ast/filename-node-conditional.h"
#include "filename/ast/filename-visitor.h"
FilenameNodeConditional::FilenameNodeConditional(FilenameNodeCondition *condition, FilenameNode *ifTrue, FilenameNode *ifFalse)
: condition(condition), ifTrue(ifTrue), ifFalse(ifFalse)
{}
FilenameNodeConditional::~Filenam... | #include "filename/ast/filename-node-conditional.h"
#include "filename/ast/filename-node-condition.h"
#include "filename/ast/filename-visitor.h"
FilenameNodeConditional::FilenameNodeConditional(FilenameNodeCondition *condition, FilenameNode *ifTrue, FilenameNode *ifFalse)
: condition(condition), ifTrue(ifTrue), ifFa... | Fix warning about deleting non full type | Fix warning about deleting non full type
| C++ | apache-2.0 | Bionus/imgbrd-grabber,Bionus/imgbrd-grabber,Bionus/imgbrd-grabber,Bionus/imgbrd-grabber,Bionus/imgbrd-grabber,Bionus/imgbrd-grabber |
cee5fc7c91c607f0ce79b04357b19473d15e7d6d | src/Common/main.cpp | src/Common/main.cpp | #include <cstdlib>
#include "Application/Parameters/ApplicationParameters.h"
#include "Application/Parameters/ApplicationParametersBuilder.h"
#include "Application/Parameters/ApplicationParametersManager.h"
#include "Application/Parameters/ApplicationParametersReader.h"
#include "FileSystem/Entities/Executable.h"
#inc... | #include <cstdlib>
#include "Application/Parameters/ApplicationParameters.h"
#include "Application/Parameters/ApplicationParametersBuilder.h"
#include "Application/Parameters/ApplicationParametersManager.h"
#include "Application/Parameters/ApplicationParametersReader.h"
#include "FileSystem/Entities/Executable.h"
#inc... | Remove test that have not to be here | Remove test that have not to be here
| C++ | mit | aphilippe/ClappLauncher,aphilippe/AppLauncher,aphilippe/ClappLauncher,aphilippe/AppLauncher,aphilippe/ClappLauncher,aphilippe/AppLauncher |
8a80168b7a52c994e51a1f3054609ed885edd32f | src/test/file_includes/stan_prob_distributions_univariate_continuous_cauchy_test.cpp | src/test/file_includes/stan_prob_distributions_univariate_continuous_cauchy_test.cpp | #include <stan/prob/distributions/univariate/continuous/Cauchy.hpp>
#include <gtest/gtest.h>
TEST(stanProbDistributionsUnivariateContinuousCauchy,headerParses) {
EXPECT_TRUE(true);
}
| #include <stan/prob/distributions/univariate/continuous/cauchy.hpp>
#include <gtest/gtest.h>
TEST(stanProbDistributionsUnivariateContinuousCauchy,headerParses) {
EXPECT_TRUE(true);
}
| Fix case of cauchy.h header in test to allow to compile on Linux. | Fix case of cauchy.h header in test to allow to compile on Linux.
| C++ | bsd-3-clause | stan-dev/math,stan-dev/stan,stan-dev/math,stan-dev/math,stan-dev/math,stan-dev/stan,stan-dev/math,stan-dev/stan,stan-dev/math,stan-dev/math,stan-dev/stan,stan-dev/math,stan-dev/stan,stan-dev/math |
e7df141f7433513b195ca727fa93975fb583a47b | 1-common-tasks/memory-management/use-raii-types.cpp | 1-common-tasks/memory-management/use-raii-types.cpp | // Use RAII types
#include <map>
#include <memory>
#include <string>
#include <vector>
int main()
{
std::vector<int> vec = {1, 2, 3, 4, 5};
std::map<std::string, int> map = {{"Foo", 10}, {"Bar", 20}};
std::string str = "Some text";
std::unique_ptr<int> ptr1 = std::make_unique<int>(8);
std::shared_ptr<int> ptr2 =... | // Use RAII types
#include <map>
#include <memory>
#include <string>
#include <vector>
int main()
{
std::vector<int> vec = {1, 2, 3, 4, 5};
std::map<std::string, int> map = {{"Foo", 10}, {"Bar", 20}};
std::string str = "Some text";
std::unique_ptr<int> ptr1 = std::make_unique<int>(8);
std::shared_ptr<int> ptr2 =... | Fix link from "use RAII" to rule of five | Fix link from "use RAII" to rule of five
| C++ | cc0-1.0 | darongE/CppSamples-Samples,thatbrod/CppSamples-Samples,brunotag/CppSamples-Samples,rollbear/CppSamples-Samples,tmwoz/CppSamples-Samples,mnpk/CppSamples-Samples,sftrabbit/CppSamples-Samples,vjacquet/CppSamples-Samples |
e71fae69ffdf51ba00152a164bc978279f9594e3 | test/brents_fun_test.cpp | test/brents_fun_test.cpp | #include "brents_fun.h"
using namespace std;
double fun1(double x)
{
return -2.0*x+1;
}
double fun2(double x)
{
return x*x-2.0*x-3;
}
void brents_fun_test()
{
double eta=1e-8;
double x;
x=brents_fun(fun1,-1.0,5.0,eta);
if(abs(x-0.5)<eta) cout<<"brents_fun passed quadratic order test!\n";
... | #include "brents_fun.h"
using namespace std;
double fun1(double x)
{
return -2.0*x+1;
}
double fun2(double x)
{
return x*x-2.0*x-3;
}
double fun3(double x,double y)
{
return x*x-2.0*x-1.0-y;
}
void brents_fun_test()
{
double eta=1e-8;
double x;
x=brents_fun(fun1,-1.0,5.0,eta);
if(abs(x-0.... | Add one test (example) to use a lamba. | Add one test (example) to use a lamba.
| C++ | mit | hshi/math_lib_hao,hshi/math_lib_hao |
6eece290d327a1c509a8dc43fbf1655bbeaa0ae8 | source/marchingcubes/AddChunksStage.cpp | source/marchingcubes/AddChunksStage.cpp | #include "AddChunksStage.h"
#include <globjects/globjects.h>
#include <gloperate/painter/AbstractCameraCapability.h>
using namespace gl;
using namespace glm;
using namespace globjects;
AddChunksStage::AddChunksStage()
: AbstractStage("AddChunks")
{
addInput("camera", camera);
addOutput("chunksToAdd", chu... | #include "AddChunksStage.h"
#include <globjects/globjects.h>
#include <gloperate/painter/AbstractCameraCapability.h>
using namespace gl;
using namespace glm;
using namespace globjects;
AddChunksStage::AddChunksStage()
: AbstractStage("AddChunks")
{
addInput("camera", camera);
addOutput("chunksToAdd", chu... | Fix rounding in chunk adding | Fix rounding in chunk adding
| C++ | mit | JenniferStamm/glexamples |
9341faf738bb41d76113c7a74f5ff829d77c91f4 | hello_world/main.cpp | hello_world/main.cpp | #include <QtCore/QCoreApplication>
#include <QNetworkAccessManager>
#include <QTimer>
#include <QJSonDocument>
#include <QJsonObject>
#include <QDebug>
#include "../QPubNub.h"
int main(int argc, char *argv[]) {
QCoreApplication a(argc, argv);
QNetworkAccessManager networkAccessManager;
QPubNub pubnub(&n... | #include <QtCore/QCoreApplication>
#include <QNetworkAccessManager>
#include <QTimer>
#include <QJSonDocument>
#include <QJsonObject>
#include <QDebug>
#include "../QPubNub.h"
int main(int argc, char *argv[]) {
QCoreApplication a(argc, argv);
QNetworkAccessManager networkAccessManager;
QPubNub pubnub(&n... | Fix warning for unreferenced parameter | Fix warning for unreferenced parameter
| C++ | mit | doo/PubNub4Qt |
05fe0575f84ea38fa2eca8a5bdea5c77f3217cda | test/lsan/TestCases/leak_check_at_exit.cc | test/lsan/TestCases/leak_check_at_exit.cc | // Test for the leak_check_at_exit flag.
// RUN: LSAN_BASE="use_stacks=0:use_registers=0"
// RUN: %clangxx_lsan %s -o %t
// RUN: LSAN_OPTIONS=$LSAN_BASE not %run %t foo 2>&1 | FileCheck %s --check-prefix=CHECK-do
// RUN: LSAN_OPTIONS=$LSAN_BASE not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-do
// RUN: LSAN_OPTION... | // Test for the leak_check_at_exit flag.
// RUN: LSAN_BASE="use_stacks=0:use_registers=0"
// RUN: %clangxx_lsan %s -o %t
// RUN: LSAN_OPTIONS=$LSAN_BASE not %run %t foo 2>&1 | FileCheck %s --check-prefix=CHECK-do
// RUN: LSAN_OPTIONS=$LSAN_BASE not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-do
// RUN: LSAN_OPTION... | Fix a typo in a test. | [lsan] Fix a typo in a test.
git-svn-id: c199f293c43da69278bea8e88f92242bf3aa95f7@226168 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 |
8648d5341980fb9b62b90f973ee975f3ae70b77a | TwoLevelDetection.cpp | TwoLevelDetection.cpp | #include "TwoLevelDetection.h"
#include <opencv2/imgproc/imgproc.hpp>
void TwoLevelDetection(const cv::Mat& input, cv::Mat& output, double detectionLevel, double measurementLevel, TwoLevelDetectionTemp& temp)
{
if (measurementLevel > detectionLevel) {
throw std::runtime_error("TwoLevelDetection: it is requ... | #include "TwoLevelDetection.h"
#include <opencv2/imgproc/imgproc.hpp>
void TwoLevelDetection(const cv::Mat& input, cv::Mat& output, double detectionLevel, double measurementLevel, TwoLevelDetectionTemp& temp)
{
if (measurementLevel > detectionLevel) {
throw std::runtime_error("TwoLevelDetection: it is requ... | Change two-level detection result output to 255 (was 1). | Change two-level detection result output to 255 (was 1).
| C++ | mit | reunanen/puukot,reunanen/puukot |
646fbccf563655d3837155d263c8da132eff92ad | cropeditor/cropview.cpp | cropeditor/cropview.cpp | #include "cropview.hpp"
CropView::CropView(QGraphicsScene *scene) : QGraphicsView(scene) {
setFrameShape(QFrame::NoFrame); // Time taken to solve: A george99g and 38 minutes.
setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
setWindowFlags(Qt::Win... | #include "cropview.hpp"
CropView::CropView(QGraphicsScene *scene) : QGraphicsView(scene) {
setFrameShape(QFrame::NoFrame); // Time taken to solve: A george99g and 38 minutes.
setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
setWindowFlags(Qt::Win... | Fix an issue with possible minimizing of CropEditor by a WM | Fix an issue with possible minimizing of CropEditor by a WM
| C++ | mit | ArsenArsen/KShare,ArsenArsen/KShare |
4f4f11e8d5e1239758a6846bcbf9ebb5c09f78b1 | src/wallet/test/wallet_test_fixture.cpp | src/wallet/test/wallet_test_fixture.cpp | // Copyright (c) 2016-2018 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <wallet/test/wallet_test_fixture.h>
#include <rpc/server.h>
#include <wallet/db.h>
#include <wallet/wallet.h>
CWal... | // Copyright (c) 2016-2018 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <wallet/test/wallet_test_fixture.h>
#include <rpc/server.h>
#include <wallet/db.h>
#include <wallet/wallet.h>
std:... | Use unique_ptr for pwalletMain (CWallet) | Use unique_ptr for pwalletMain (CWallet)
| C++ | mit | chaincoin/chaincoin,chaincoin/chaincoin,chaincoin/chaincoin,chaincoin/chaincoin,chaincoin/chaincoin,chaincoin/chaincoin |
3009473fe53734890768250e4b4ae81a42df9c85 | src/runtime/android_clock.cpp | src/runtime/android_clock.cpp | #define SYS_CLOCK_GETTIME 263
#include "linux_clock.cpp"
| #ifdef BITS_64
#define SYS_CLOCK_GETTIME 113
#endif
#ifdef BITS_32
#define SYS_CLOCK_GETTIME 263
#endif
#include "linux_clock.cpp"
| Fix a syscall number for 64-bit arm | Fix a syscall number for 64-bit arm
| C++ | mit | dougkwan/Halide,ronen/Halide,dougkwan/Halide,dougkwan/Halide,tdenniston/Halide,jiawen/Halide,tdenniston/Halide,psuriana/Halide,kgnk/Halide,kgnk/Halide,psuriana/Halide,tdenniston/Halide,ronen/Halide,jiawen/Halide,jiawen/Halide,tdenniston/Halide,tdenniston/Halide,psuriana/Halide,psuriana/Halide,tdenniston/Halide,jiawen/H... |
510dd43dc2e77f0fdeef154e0b94e36d7e55b52e | test/correctness/thread_safety.cpp | test/correctness/thread_safety.cpp | #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 =... | #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::thread has implementation-dependent behavior; some implementations
// may... | Use a pool of 8 threads. | Use a pool of 8 threads.
| C++ | mit | kgnk/Halide,kgnk/Halide,psuriana/Halide,psuriana/Halide,kgnk/Halide,kgnk/Halide,psuriana/Halide,psuriana/Halide,psuriana/Halide,kgnk/Halide,kgnk/Halide,psuriana/Halide,psuriana/Halide,kgnk/Halide,kgnk/Halide |
c552b8e1778f75d1863ca7c79297e61505262309 | application.cpp | application.cpp | #include "application.hpp"
#include <SDL2/SDL.h>
#include <stdexcept>
Application *Application::instance_ = nullptr;
Application::Application(int &argc, char **argv)
{
if (instance_ != nullptr)
throw std::runtime_error("The program can have only one instance of Application");
instance_ = this;
if ... | #include "application.hpp"
#include <SDL2/SDL.h>
#include <stdexcept>
#include <string>
Application *Application::instance_ = nullptr;
Application::Application(int &argc, char **argv)
{
if (instance_ != nullptr)
throw std::runtime_error("The program can have only one instance of Application");
instanc... | Fix build for Mac OS X | Fix build for Mac OS X
| C++ | mit | antonte/texteditor |
43990a610d3bb59a347bcb4e14c46ea697558e11 | tests/TestIODevice.cpp | tests/TestIODevice.cpp | #include "TestIODevice.hpp"
#include <iostream>
void TestIODevice::fakeWrite(const QByteArray& data)
{
readStore.append(data);
emit readyRead();
}
qint64 TestIODevice::readData(char* data, qint64 maxSize)
{
auto readData = readStore.left(maxSize);
//std::cerr << "Read " << readData.size() << " byte(s... | #include "TestIODevice.hpp"
#include <iostream>
#include <cstring>
void TestIODevice::fakeWrite(const QByteArray& data)
{
readStore.append(data);
emit readyRead();
}
qint64 TestIODevice::readData(char* data, qint64 maxSize)
{
auto readData = readStore.left(maxSize);
//std::cerr << "Read " << readData... | Use memcpy, not qstrcpy, when copying data in the test device | Use memcpy, not qstrcpy, when copying data in the test device
| C++ | mit | Thonik/rainback |
2560a08f631ac7c0368364d501e7cce3c0a9f16e | source/tests/integration-specialcasing.cpp | source/tests/integration-specialcasing.cpp | #include "tests-base.hpp"
#include "helpers-casemapping.hpp"
#include "helpers-strings.hpp"
TEST(SpecialCasing, LithuanianRemoveDotAbove)
{
// Remove DOT ABOVE after "i" with upper or titlecase
// U+0049 U+0307
// U+0069
EXPECT_STREQ("lt-LT", setlocale(LC_ALL, "lt-LT"));
EXPECT_CASEMAPPING_EQ("i\x... | #include "tests-base.hpp"
#include "helpers-casemapping.hpp"
#include "helpers-strings.hpp"
TEST(SpecialCasing, LithuanianRemoveDotAbove)
{
EXPECT_STREQ("lt-LT", setlocale(LC_ALL, "lt-LT"));
// Remove DOT ABOVE after "i" with upper or titlecase
EXPECT_CASEMAPPING_EQ("i\xCC\x87", "i\xCC\x87", "I", "I")... | Add tests for Lithuanian special case mapping. | Add tests for Lithuanian special case mapping.
| C++ | mit | tkelman/utf8rewind,tkelman/utf8rewind,tkelman/utf8rewind,tkelman/utf8rewind |
7e0227039795fdc9891b14697f54b888d7f69fb6 | src/effects/SkColorMatrixFilter.cpp | src/effects/SkColorMatrixFilter.cpp | /*
* Copyright 2011 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "SkColorMatrixFilter.h"
static SkScalar byte_to_scale(U8CPU byte) {
if (0xFF == byte) {
// want to get this exact
return 1;
} else {
... | /*
* Copyright 2011 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "SkColorMatrixFilter.h"
static SkScalar byte_to_scale(U8CPU byte) {
if (0xFF == byte) {
// want to get this exact
return 1;
} else {
... | Simplify LightingFilter in add-free case am: 0698300cc5 am: a184d5e49d | Simplify LightingFilter in add-free case am: 0698300cc5
am: a184d5e49d
* commit 'a184d5e49d173dd5b783a2022b28f45f70b665ee':
Simplify LightingFilter in add-free case
Change-Id: I301638b73e0e52e1371063d69a5e7dcdd12edfb7
| C++ | bsd-3-clause | Hikari-no-Tenshi/android_external_skia,Hikari-no-Tenshi/android_external_skia,aosp-mirror/platform_external_skia,Hikari-no-Tenshi/android_external_skia,Hikari-no-Tenshi/android_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,Hikari-no-Tenshi/android_external_skia,Hikari-no-Tenshi/and... |
7a02234a7ba6e785d927d04ff19e66b1ea625e8b | test/Misc/backend-optimization-failure.cpp | test/Misc/backend-optimization-failure.cpp | // RUN: %clang_cc1 -triple x86_64-unknown-unknown %s -O3 -emit-llvm -gline-tables-only -S -verify -o /dev/null
// REQUIRES: x86-registered-target
// Test verifies optimization failures generated by the backend are handled
// correctly by clang. LLVM tests verify all of the failure conditions.
void test_switch(int *A,... | // RUN: %clang_cc1 -triple x86_64-unknown-unknown %s -O3 -emit-llvm -gline-tables-only -S -verify -o /dev/null
// REQUIRES: x86-registered-target
// Test verifies optimization failures generated by the backend are handled
// correctly by clang. LLVM tests verify all of the failure conditions.
void test_switch(int *A,... | Adjust test to handle fallout from r217102. | Adjust test to handle fallout from r217102.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@217104 91177308-0d34-0410-b5e6-96231b3b80d8
| C++ | apache-2.0 | llvm-mirror/clang,apple/swift-clang,apple/swift-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-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-cl... |
7055402826989ca0f4c238ee9783054c7479c502 | xinput-batlev/Main.cpp | xinput-batlev/Main.cpp | #include "WindowsAPIs.h"
#include "TaskIcon.h"
INT WINAPI WinMain(HINSTANCE hinst, HINSTANCE, LPSTR, INT)
{
hinstance = hinst;
TaskIcon().MessageLoop();
return 0;
}
| #include "WindowsAPIs.h"
#include "TaskIcon.h"
INT WINAPI WinMain(HINSTANCE hinst, HINSTANCE, LPSTR, INT)
{
hinstance = hinst;
XInputEnable(TRUE);
TaskIcon().MessageLoop();
return 0;
}
| Enable XINPUT right away maybe? | Enable XINPUT right away maybe?
| C++ | mit | Connorcpu/xinput-batlev |
c7aa81189bf13e3b1d70af55ce1b97bd9055e89f | Test/SegmentListTest.cc | Test/SegmentListTest.cc | #include <SegmentList.hh>
#include "catch.hpp"
SCENARIO("Kernel heap allocator SegmentList", "[kernelheap]")
{
GIVEN("A segment list")
{
SegmentList list;
WHEN("The list is empty")
{
THEN("The count of the list is zero")
{
CHECK(list.count() == 0);
}
... | #include <SegmentList.hh>
#include "catch.hpp"
SCENARIO("Kernel heap allocator SegmentList", "[kernelheap]")
{
GIVEN("A segment list")
{
SegmentList list;
WHEN("The list is empty")
{
THEN("The count of the list is zero")
{
CHECK(list.count() == 0);
}
... | Add more tests for iteration | Add more tests for iteration
| C++ | bsd-2-clause | ahoka/esrtk,ahoka/esrtk,ahoka/esrtk |
4a1360789218480d10ddc55d3a7c480705217555 | src/planner/main_action_planner/src/main_action_planner_node.cpp | src/planner/main_action_planner/src/main_action_planner_node.cpp | #include "main_action_planner_node.hpp"
int main(int argc, char** argv) {
return 0;
}
| #include "main_action_planner_node.hpp"
int main(int argc, char** argv) {
ros::init(argc, argv, "main_action_planner_node");
ros::NodeHandle nh("~");
return 0;
}
| Add minimum code to main func of MAP node. | Add minimum code to main func of MAP node.
Add ros::init.
Add ros::NodeHandle("~").
| C++ | mit | agrirobo/arcsys2,agrirobo/arcsys2 |
6c2981dc25e31120f1ab068a7656a0b96927c297 | binpac/codegen/operators/function.cc | binpac/codegen/operators/function.cc |
#include "cg-operator-common.h"
#include <binpac/autogen/operators/function.h>
using namespace binpac;
using namespace binpac::codegen;
void CodeBuilder::visit(expression::operator_::function::Call* i)
{
auto func = ast::checkedCast<expression::Function>(i->op1());
auto args = callParameters(i->op2());
... |
#include "cg-operator-common.h"
#include <binpac/autogen/operators/function.h>
using namespace binpac;
using namespace binpac::codegen;
void CodeBuilder::visit(expression::operator_::function::Call* i)
{
auto func = ast::checkedCast<expression::Function>(i->op1());
auto args = callParameters(i->op2());
... | Fix for in-unit hooks not passing the cookie on to C. | Fix for in-unit hooks not passing the cookie on to C.
| C++ | bsd-3-clause | rsmmr/hilti,rsmmr/hilti,rsmmr/hilti,FrozenCaribou/hilti,rsmmr/hilti,FrozenCaribou/hilti,rsmmr/hilti,FrozenCaribou/hilti,FrozenCaribou/hilti,FrozenCaribou/hilti |
a2108725a36688546998d04641545d6198643c28 | src/main.cpp | src/main.cpp | #include <QtQuick>
#include <sailfishapp.h>
#include <QScopedPointer>
#include <QQuickView>
#include <QQmlEngine>
#include <QGuiApplication>
#include "factor.h"
int main(int argc, char *argv[])
{
// For this example, wizard-generates single line code would be good enough,
// but very soon it won't be enough ... | #include <QtQuick>
#include <sailfishapp.h>
#include <QScopedPointer>
#include <QQuickView>
#include <QQmlEngine>
#include <QGuiApplication>
#include "factor.h"
int main(int argc, char *argv[])
{
// For this example, wizard-generates single line code would be good enough,
// but very soon it won't be enough ... | Set some names and titles just in case they are useful to set. | Set some names and titles just in case they are useful to set.
| C++ | mit | lanurmi/sailfactor,lanurmi/sailfactor |
c5198800725ec630a80839048e2bd26bc14e8b75 | lib/ADT/IListIterator.cpp | lib/ADT/IListIterator.cpp | //===- IListIterator.cpp --------------------------------------------------===//
//
// The Bold Project
//
// This file is distributed under the New BSD License.
// See LICENSE for details.
//
//===----------------------------------------------------------------------===//
#include <bold/AD... | //===- IListIterator.cpp --------------------------------------------------===//
//
// The Bold Project
//
// This file is distributed under the New BSD License.
// See LICENSE for details.
//
//===----------------------------------------------------------------------===//
#include <bold/AD... | Use IListNodeBase instead of type redefinition. | Use IListNodeBase instead of type redefinition.
| C++ | bsd-3-clause | astrotycoon/bold-utils,hjmeric/bold-utils,astrotycoon/bold-utils,hjmeric/bold-utils |
55b0b3bee2d219b3dfa42fec7ca53497e6d08212 | pymue/pymue.cpp | pymue/pymue.cpp | #include <boost/python.hpp>
#include "mue_algorithm.h"
#include "teams.h"
#include "distances.h"
#include "seen_table.h"
char const * peng() {
return mue::peng().c_str();
}
BOOST_PYTHON_MODULE (_pymue)
{
using namespace boost::python;
def ("peng", peng);
class_<mue::Team>("Team", init<int>())
.def("id", &m... | #include <boost/python.hpp>
#include "mue_algorithm.h"
#include "teams.h"
#include "distances.h"
#include "seen_table_wrapper.h"
char const * peng() {
return mue::peng().c_str();
}
BOOST_PYTHON_MODULE (_pymue)
{
using namespace boost::python;
def ("peng", peng);
class_<mue::Team>("Team", init<int>())
.de... | Replace Seen_table with Seen_table_wrapper in the binding | Replace Seen_table with Seen_table_wrapper in the binding
Signed-off-by: Jan Losinski <577c4104c61edf9f052c616c0c23e67bef4a9955@wh2.tu-dresden.de>
| C++ | bsd-3-clause | eXma/meet-and-eat-distribution-tool,janLo/meet-and-eat-distribution-tool,eXma/meet-and-eat-distribution-tool,janLo/meet-and-eat-distribution-tool,janLo/meet-and-eat-distribution-tool,eXma/meet-and-eat-distribution-tool |
dd8f4539c4dcdc7499a892b62720078003eae6c0 | test/std/thread/thread.mutex/thread.mutex.requirements/thread.mutex.requirements.mutex/thread.mutex.class/lock.pass.cpp | test/std/thread/thread.mutex/thread.mutex.requirements/thread.mutex.requirements.mutex/thread.mutex.class/lock.pass.cpp | //===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===---------------------------... | //===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===---------------------------... | Mark another test as flaky | Mark another test as flaky
Reported on the NetBSD 8 buildbot.
git-svn-id: 756ef344af921d95d562d9e9f9389127a89a6314@351995 91177308-0d34-0410-b5e6-96231b3b80d8
| C++ | apache-2.0 | llvm-mirror/libcxx,llvm-mirror/libcxx,llvm-mirror/libcxx,llvm-mirror/libcxx,llvm-mirror/libcxx |
561213364ef463cbe51a9744a4803424d5e32121 | src/geom/Coordinate.cpp | src/geom/Coordinate.cpp | /**********************************************************************
*
* GEOS - Geometry Engine Open Source
* http://geos.refractions.net
*
* Copyright (C) 2001-2002 Vivid Solutions Inc.
*
* This is free software; you can redistribute and/or modify it under
* the terms of the GNU Lesser General Public Licenc... | /**********************************************************************
*
* GEOS - Geometry Engine Open Source
* http://geos.refractions.net
*
* Copyright (C) 2001-2002 Vivid Solutions Inc.
*
* This is free software; you can redistribute and/or modify it under
* the terms of the GNU Lesser General Public Licenc... | Use 18 significant digits for TopologyException point coordinates | Use 18 significant digits for TopologyException point coordinates
git-svn-id: 6c2b1bd10c324c49ea9d9e6e31006a80e70507cb@3522 5242fede-7e19-0410-aef8-94bd7d2200fb
| C++ | lgpl-2.1 | vmx/geos,vmx/geos,vmx/geos,vmx/geos,vmx/geos,vmx/geos |
77b14694865f6eebf825a702d8d057eca78ae2d7 | excercise04/sort/insertion.cpp | excercise04/sort/insertion.cpp | #include "insertion.hpp"
#include "swap.hpp"
void insertion(int *data, const int size_of_data)
{
for(int i = 0; i < size_of_data; ++i)
{
int j;
for(j = i; j >= 0 && data[j] < data[i]; --j);
swap(data[i], data[j]);
}
}
| #include "insertion.hpp"
#include "swap.hpp"
void insertion(int *data, const int size_of_data)
{
for(int i = 0; i < size_of_data; ++i)
{
for(int j = i; j > 0 && data[j] < data[j - 1]; --j) swap(data[j], data[j - 1]);
}
}
| Fix the logic of Insertion sort which is not working | Fix the logic of Insertion sort which is not working
| C++ | mit | kdzlvaids/algorithm_and_practice-pknu-2016,kdzlvaids/algorithm_and_practice-pknu-2016 |
4dabbcc70d3966c071c9e24b07a77d6ef40664b7 | src/Bull/Render/Buffer/VertexArrayObject.cpp | src/Bull/Render/Buffer/VertexArrayObject.cpp | #include <Bull/Core/Exception/RuntimeError.hpp>
#include <Bull/Render/Buffer/VertexArrayObject.hpp>
#include <Bull/Render/OpenGL.hpp>
namespace Bull
{
VertexArrayObject::VertexArrayObject() :
m_vao(0)
{
gl::genVertexArrays(1, &m_vao);
if(!gl::isVertexArray(m_vao))
{
... | #include <Bull/Core/Exception/RuntimeError.hpp>
#include <Bull/Render/Buffer/VertexArrayObject.hpp>
#include <Bull/Render/OpenGL.hpp>
namespace Bull
{
VertexArrayObject::VertexArrayObject() :
m_vao(0)
{
gl::genVertexArrays(1, &m_vao);
if(!m_vao)
{
throw RuntimeErro... | Rename creation method to avoid ambiguity with resource loading | [Render/Texture] Rename creation method to avoid ambiguity with resource loading
| C++ | mit | siliace/Bull |
a08bfa6f5b6115a910060405ec8e88db8f8e539e | gpu/command_buffer/client/gles2_lib.cc | gpu/command_buffer/client/gles2_lib.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.
#include "../client/gles2_lib.h"
#include "../common/thread_local.h"
namespace gles2 {
namespace {
gpu::ThreadLocalKey g_gl_context_key;
} // namesp... | // 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.
#include "../client/gles2_lib.h"
#include "../common/thread_local.h"
namespace gles2 {
// TODO(kbr): the use of this anonymous namespace core dumps t... | Work around bug in gcc's name mangling causing linker to crash on Mac OS X. | Work around bug in gcc's name mangling causing linker to crash on Mac
OS X.
BUG=40845
TEST=none
TBR=gman
Review URL: http://codereview.chromium.org/2079003
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@47225 0039d316-1c4b-4281-b951-d872f2087c98
| C++ | bsd-3-clause | M4sse/chromium.src,zcbenz/cefode-chromium,hujiajie/pa-chromium,Jonekee/chromium.src,Chilledheart/chromium,crosswalk-project/chromium-crosswalk-efl,anirudhSK/chromium,crosswalk-project/chromium-crosswalk-efl,pozdnyakov/chromium-crosswalk,hgl888/chromium-crosswalk-efl,rogerwang/chromium,chuan9/chromium-crosswalk,hgl888/c... |
0eddc9ac89ea43cb9f46a61d1a253a34599d628d | chrome/browser/extensions/extension_popup_apitest.cc | chrome/browser/extensions/extension_popup_apitest.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.
#include "base/command_line.h"
#include "chrome/browser/extensions/extension_apitest.h"
#include "chrome/common/chrome_switches.h"
// Flaky, http://c... | // 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.
#include "base/command_line.h"
#include "chrome/browser/extensions/extension_apitest.h"
#include "chrome/common/chrome_switches.h"
// Times out. See ... | Disable ExtensionApiTest.Popup. It's been timing out for the last 750+ runs. | Disable ExtensionApiTest.Popup. It's been timing out for the last 750+ runs.
TBR=michaeln
BUG=46601
TEST=ExtensionApiTest.FLAKY_Popup no longer runs
Review URL: http://codereview.chromium.org/3603003
git-svn-id: http://src.chromium.org/svn/trunk/src@61170 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Former-commit-id: 8c32d... | C++ | bsd-3-clause | meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-u... |
0371713ba44672cbe9bbb365e74376f1ad6a6e77 | src/PythonPath.cpp | src/PythonPath.cpp | #include "stdafx.h"
#include <string>
#include "Logger.h"
#ifdef _WIN64
#define PYTHONPATH L"python-embed-amd64"
#else
#define PYTHONPATH L"python-embed-win32"
#endif
EXTERN_C IMAGE_DOS_HEADER __ImageBase;
std::wstring getPythonPath()
{
// https://stackoverflow.com/questions/6924195/get-dll-path-at-runtime
W... | #include "stdafx.h"
#include <string>
#include "Logger.h"
#ifdef _WIN64
#define EMBEDDEDPYTHONPATH L"python-embed-amd64"
#else
#define EMBEDDEDPYTHONPATH L"python-embed-win32"
#endif
EXTERN_C IMAGE_DOS_HEADER __ImageBase;
std::wstring getPythonPath()
{
// https://stackoverflow.com/questions/6924195/get-dll-path-... | Change define name to prevent name clashes with the python interpreter | Change define name to prevent name clashes with the python interpreter
| C++ | mit | overfl0/Pythia,overfl0/Pythia,overfl0/Pythia,overfl0/Pythia |
8faa5c753b07487d8e0516fb964d4c060b549ef0 | asylo/platform/primitives/examples/entry_points.cc | asylo/platform/primitives/examples/entry_points.cc | /*
*
* Copyright 2019 Asylo authors
*
* 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 2019 Asylo authors
*
* 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... | Revert dummy handle signal definition | Revert dummy handle signal definition
Revert entry point definitions which have been migrated to
trusted application
PiperOrigin-RevId: 260610866
Change-Id: I8613155a78aecff97c1ceec493037648c5a09722
| C++ | apache-2.0 | google/asylo,google/asylo,google/asylo,google/asylo,google/asylo,google/asylo |
6f4f4cee4531769f856c7e11cddc90f89b7e7dad | DNAnalyzer/DNAnalyzerServerTest/DictionnaireTest.cpp | DNAnalyzer/DNAnalyzerServerTest/DictionnaireTest.cpp | #include "stdafx.h"
#include "CppUnitTest.h"
#include "../DNAnalyzerServer/Dictionnaire.h"
#include <exception>
#include <cstring>
using namespace Microsoft::VisualStudio::CppUnitTestFramework;
namespace DNAnalyzerServerTest
{
TEST_CLASS(DictionnaireTest)
{
public:
//ObtenirInstance
TEST_METHOD(ObtenirInstance... | #include "stdafx.h"
#include "CppUnitTest.h"
#include "../DNAnalyzerServer/Dictionnaire.h"
#include "../DNAnalyzerServer/Mots.h"
#include <exception>
#include <unordered_set>
#include <cstring>
#include <string>
using namespace Microsoft::VisualStudio::CppUnitTestFramework;
namespace DNAnalyzerServerTest
{
TEST_CLAS... | Revert "Revert "Ajout de methode de test (incomplete) de Dictionnaire"" | Revert "Revert "Ajout de methode de test (incomplete) de Dictionnaire""
This reverts commit c0a5540b2f83139a18d18956eb7a59f5d78692ee.
| C++ | mit | benjaminchazelle/DNAnalyzer,benjaminchazelle/DNAnalyzer,benjaminchazelle/DNAnalyzer |
edcb8b04023177ec916eac600731b805be4c3479 | src/tests/test-getusername.cpp | src/tests/test-getusername.cpp | #include <string>
#include <vector>
#include <unistd.h>
#include <gtest/gtest.h>
#include <scxcorelib/scxstrencodingconv.h>
#include "getusername.h"
TEST(GetUserName,simple)
{
// allocate a WCHAR_T buffer to receive username
DWORD lpnSize = L_cuserid;
WCHAR_T lpBuffer[lpnSize];
BOOL result = GetUserName(lpBuffer,... | #include <string>
#include <vector>
#include <unistd.h>
#include <gtest/gtest.h>
#include <scxcorelib/scxstrencodingconv.h>
#include "getusername.h"
class GetUserNameTest : public ::testing::Test {
protected:
DWORD lpnSize;
std::vector<WCHAR_T> lpBuffer;
BOOL result;
std::string userName;
GetUserNameTest(): user... | Use test fixture in GetUserName unit tests | Use test fixture in GetUserName unit tests
| C++ | mit | JamesWTruher/PowerShell-1,bingbing8/PowerShell,bmanikm/PowerShell,bingbing8/PowerShell,TravisEz13/PowerShell,PaulHigin/PowerShell,JamesWTruher/PowerShell-1,KarolKaczmarek/PowerShell,daxian-dbw/PowerShell,TravisEz13/PowerShell,bmanikm/PowerShell,bingbing8/PowerShell,bmanikm/PowerShell,jsoref/PowerShell,jsoref/PowerShell... |
04f82cbc3eb4e33b54824d8a43c1f4a88f893df9 | src/util/textfile/textfile.cpp | src/util/textfile/textfile.cpp | #include "textfile.ih"
vector<unsigned char> indexedcorpus::readFile(string const &filename)
{
QFileInfo p(filename.c_str());
if (p.isFile())
throw runtime_error(string("readFile: '") + filename + "' is not a regular file!");
vector<unsigned char> data;
ifstream dataStream(filename.c_str());
if (!data... | #include "textfile.ih"
vector<unsigned char> indexedcorpus::readFile(string const &filename)
{
QFileInfo p(filename.c_str());
if (!p.isFile())
throw runtime_error(string("readFile: '") + filename + "' is not a regular file!");
vector<unsigned char> data;
ifstream dataStream(filename.c_str());
if (!dat... | Fix a flawed check in indexedcorpus::readFile. | Fix a flawed check in indexedcorpus::readFile.
| C++ | lgpl-2.1 | evdmade01/alpinocorpus,evdmade01/alpinocorpus,rug-compling/alpinocorpus,rug-compling/alpinocorpus,rug-compling/alpinocorpus |
fdcfefa0a90d44ff5b56504610d7459898fe7721 | runtime/Cpp/runtime/src/Exceptions.cpp | runtime/Cpp/runtime/src/Exceptions.cpp | /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.
* Use of this file is governed by the BSD 3-clause license that
* can be found in the LICENSE.txt file in the project root.
*/
#include "Exceptions.h"
using namespace antlr4;
RuntimeException::RuntimeException(const std::string &msg) : std::except... | /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.
* Use of this file is governed by the BSD 3-clause license that
* can be found in the LICENSE.txt file in the project root.
*/
#include "Exceptions.h"
using namespace antlr4;
RuntimeException::RuntimeException(const std::string &msg) : std::except... | Change virtual dtor to empty bodies | Convention: Change virtual dtor to empty bodies
| C++ | bsd-3-clause | parrt/antlr4,parrt/antlr4,antlr/antlr4,ericvergnaud/antlr4,antlr/antlr4,antlr/antlr4,ericvergnaud/antlr4,ericvergnaud/antlr4,antlr/antlr4,parrt/antlr4,antlr/antlr4,parrt/antlr4,parrt/antlr4,antlr/antlr4,antlr/antlr4,antlr/antlr4,ericvergnaud/antlr4,ericvergnaud/antlr4,ericvergnaud/antlr4,ericvergnaud/antlr4,parrt/antlr... |
9e1084c19d907e9ac5f5c12f6d40d4eb1ef9c877 | chrome/browser/extensions/extension_popup_apitest.cc | chrome/browser/extensions/extension_popup_apitest.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.
#include "base/command_line.h"
#include "chrome/browser/extensions/extension_apitest.h"
#include "chrome/common/chrome_switches.h"
IN_PROC_BROWSER_T... | // 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.
#include "base/command_line.h"
#include "chrome/browser/extensions/extension_apitest.h"
#include "chrome/common/chrome_switches.h"
// Flaky, http://c... | Mark ExtensionApiTest.Popup as FLAKY, it is still flaky. | Mark ExtensionApiTest.Popup as FLAKY, it is still flaky.
TBR=twiz
BUG=46601
TEST=browser_tests
Review URL: http://codereview.chromium.org/3356001
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@58208 0039d316-1c4b-4281-b951-d872f2087c98
| C++ | bsd-3-clause | nacl-webkit/chrome_deps,PeterWangIntel/chromium-crosswalk,rogerwang/chromium,M4sse/chromium.src,M4sse/chromium.src,chuan9/chromium-crosswalk,Chilledheart/chromium,chuan9/chromium-crosswalk,Jonekee/chromium.src,ChromiumWebApps/chromium,chuan9/chromium-crosswalk,hujiajie/pa-chromium,ChromiumWebApps/chromium,bright-sparks... |
4515a55eed39d5d3440be2420cfcebd96576a43d | test/test_main.cc | test/test_main.cc | /*
* Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contribut... | /*
* Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contribut... | Revert "Re-enable absl FailureSignalHandler in tests." | Revert "Re-enable absl FailureSignalHandler in tests."
This reverts commit 46e9629dda1de4315b5106741cc7072b4e01548c.
Reason for revert: Speculative revert.
Original change's description:
> Re-enable absl FailureSignalHandler in tests.
>
> It was not the cause of the SIGSEGV on iossim, so it is fine to
> re-enable i... | C++ | bsd-3-clause | TimothyGu/libilbc,TimothyGu/libilbc,ShiftMediaProject/libilbc,TimothyGu/libilbc,ShiftMediaProject/libilbc,TimothyGu/libilbc,ShiftMediaProject/libilbc,TimothyGu/libilbc,ShiftMediaProject/libilbc,ShiftMediaProject/libilbc |
3f8b6ee636c09774f165b45d97b9fbe152faa9bd | src/DotGraphOutput.cc | src/DotGraphOutput.cc | #include "DotGraphOutput.hh"
#include "EdgeType.hh"
string getEdgeStyle(EdgeType t) {
switch (t) {
case EdgeType::Plane:
return "[color=red]";
case EdgeType::Train:
return "[color=blue,style=dotted]";
default:
return "";
}
}
template <typename V>
void DotGraphOutput<V>::output(string path) {
... | #include "DotGraphOutput.hh"
#include "EdgeType.hh"
string getEdgeStyle(EdgeType t) {
switch (t) {
case EdgeType::Plane:
return "[color=red]";
case EdgeType::Train:
return "[color=blue,style=dotted]";
default:
return "";
}
}
template <typename V>
void DotGraphOutput<V>::output(string path) {
... | Add the nodes name to the dot output | Add the nodes name to the dot output
| C++ | unlicense | Thooms/yolo-graphs,Thooms/yolo-graphs,Thooms/yolo-graphs |
46033c116125976ea29caa9dae45cf88d7d61b6e | cpr/timeout.cpp | cpr/timeout.cpp | #include "cpr/timeout.h"
#include <limits>
#include <stdexcept>
#include <string>
#include <type_traits>
namespace cpr {
long Timeout::Milliseconds() const {
static_assert(std::is_same<std::chrono::milliseconds, decltype(ms)>::value,
"Following casting expects milliseconds.");
if (ms.count... | #include "cpr/timeout.h"
#include <limits>
#include <stdexcept>
#include <string>
#include <type_traits>
namespace cpr {
long Timeout::Milliseconds() const {
static_assert(std::is_same<std::chrono::milliseconds, decltype(ms)>::value,
"Following casting expects milliseconds.");
if (ms.count... | Revert some casts that are needed. | Revert some casts that are needed.
| C++ | mit | whoshuu/cpr,whoshuu/cpr,whoshuu/cpr |
3548f36e8cf3994aefbacd4327200809deb82ff5 | src/Log.cpp | src/Log.cpp | #include "Log.h"
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <string.h>
#include <iostream>
Log m_globalLog;
Log* Log::instance()
{
return &m_globalLog;
}
Log::Log()
: m_fd(-1)
{
}
Log::~Log()
{
close(m_fd);
}
void Log::open(const std::string& path)
{
m_fd = ::open(path.c_str(),S_... | #include "Log.h"
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <string.h>
#include <iostream>
Log m_globalLog;
Log* Log::instance()
{
return &m_globalLog;
}
Log::Log()
: m_fd(-1)
{
}
Log::~Log()
{
close(m_fd);
}
void Log::open(const std::string& path)
{
m_fd = ::open(path.c_str(),S_... | Add entry type information at the start of each log file entry. | Add entry type information at the start of each log file entry.
| C++ | bsd-2-clause | zhengw1985/Update-Installer,zhengw1985/Update-Installer,zhengw1985/Update-Installer |
a1859ce7e4264b7f0b054ab0dd46b8663597b634 | src/eval.cc | src/eval.cc | #include "eval.h"
#include "env.h"
namespace mclisp
{
ConsCell *Eval(const ConsCell *exp, ConsCell *env /* env::g_user_env */)
{
if (Atom(exp))
return env::Lookup(env, exp);
if (Atom(Car(exp)))
{
if (Eq(Car(exp), g_builtin_symbols["QUOTE"]))
return Cadr(exp);
if (Eq(Car(exp), g_builtin_symbol... | #include "eval.h"
#include "env.h"
namespace
{
using namespace mclisp;
ConsCell *Evcon(const ConsCell *clauses, ConsCell *env)
{
// TODO Might want throw something more descriptive than TypeError.
TYPECHECK(clauses, Listp);
if (Null(clauses))
return kNil;
TYPECHECK(Car(clauses), Consp);
if (*Eval(Caa... | Add EQ, COND, CAR, CDR and CONS to Eval. | Add EQ, COND, CAR, CDR and CONS to Eval.
| C++ | mit | appleby/mccarthy-lisp,appleby/mccarthy-lisp,appleby/mccarthy-lisp,appleby/mccarthy-lisp,appleby/mccarthy-lisp |
c078b711c9ed96db208c8232a7732fc149894c95 | rclogd/localserver.cpp | rclogd/localserver.cpp | #include "localserver.h"
namespace rclog {
LocalServer::LocalServer(boost::asio::io_service &io_service, std::string socket_path)
:socket_(io_service, datagram_protocol::endpoint(socket_path)) {
do_receive();
}
void LocalServer::do_receive() {
socket_.async_receive_from(boost::asio::buffer(data_, max_le... | #include "localserver.h"
namespace rclog {
LocalServer::LocalServer(boost::asio::io_service &io_service, std::string socket_path)
:socket_(io_service, datagram_protocol::endpoint(socket_path)) {
do_receive();
}
void LocalServer::do_receive() {
socket_.async_receive_from(boost::asio::buffer(data_, max_le... | Add message_size error handle to rclogd | Add message_size error handle to rclogd
| C++ | mit | blaecwen/rc_logging,blaecwen/rc_logging |
072dc65dcfc91e635e8a9a0c660b201681c86a36 | src/gamescene.cpp | src/gamescene.cpp | #include "gamescene.h"
void GameScene::append_gameItem(QDeclarativeListProperty<GameItem> *list, GameItem *gameItem)
{
GameScene *scene = qobject_cast<GameScene *>(list->object);
if (scene) {
gameItem->setParentItem(scene);
scene->m_gameItems.append(gameItem);
}
}
GameScene::GameScene(QQui... | #include "gamescene.h"
void GameScene::append_gameItem(QDeclarativeListProperty<GameItem> *list, GameItem *gameItem)
{
GameScene *scene = qobject_cast<GameScene *>(list->object);
if (scene) {
gameItem->setParentItem(scene);
scene->m_gameItems.append(gameItem);
}
}
GameScene::GameScene(QQui... | Change default running state to true | Change default running state to true
| C++ | mit | paulovap/Bacon2D,arcrowel/Bacon2D,kenvandine/Bacon2D,kenvandine/Bacon2D,paulovap/Bacon2D,arcrowel/Bacon2D |
44d5d8d0bc6c71a62d6dd85f3c5aad811a1e0336 | test/unit/math/prim/scal/fun/is_nan_test.cpp | test/unit/math/prim/scal/fun/is_nan_test.cpp | #include <stan/math/prim/scal.hpp>
#include <gtest/gtest.h>
#include <limits>
TEST(MathFunctions, is_nan) {
using stan::math::is_nan;
double infinity = std::numeric_limits<double>::infinity();
double nan = std::numeric_limits<double>::quiet_NaN();
double min = std::numeric_limits<double>::min();
double max =... | #include <stan/math/prim/scal.hpp>
#include <gtest/gtest.h>
#include <limits>
TEST(MathFunctions, is_nan) {
using stan::math::is_nan;
double infinity = std::numeric_limits<double>::infinity();
double nan = std::numeric_limits<double>::quiet_NaN();
double min = std::numeric_limits<double>::min();
double max =... | Add tests for variadic calls | Add tests for variadic calls
| C++ | bsd-3-clause | stan-dev/math,stan-dev/math,stan-dev/math,stan-dev/math,stan-dev/math,stan-dev/math,stan-dev/math,stan-dev/math,stan-dev/math |
52fb64b8c6b0b0e1dc3a69b27888ee7fd594660d | src/mtac/Loop.cpp | src/mtac/Loop.cpp | //=======================================================================
// Copyright Baptiste Wicht 2011-2012.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//================================================... | //=======================================================================
// Copyright Baptiste Wicht 2011-2012.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//================================================... | Fix iteration through loop bb | Fix iteration through loop bb
| C++ | mit | vogelsgesang/eddic,vogelsgesang/eddic,wichtounet/eddic,wichtounet/eddic,vogelsgesang/eddic,wichtounet/eddic |
c6a4bfeea185dd4bd8c9d770a26c3974212e48dc | cpp/turbodbc/Library/src/time_helpers.cpp | cpp/turbodbc/Library/src/time_helpers.cpp | #include <turbodbc/time_helpers.h>
#include <sql.h>
#include <boost/date_time/gregorian/gregorian_types.hpp>
#include <boost/date_time/posix_time/posix_time_types.hpp>
namespace turbodbc {
boost::posix_time::ptime const timestamp_epoch({1970, 1, 1}, {0, 0, 0, 0});
int64_t timestamp_to_microseconds(char con... | #include <turbodbc/time_helpers.h>
#ifdef _WIN32
#include <windows.h>
#endif
#include <cstring>
#include <sql.h>
#include <boost/date_time/gregorian/gregorian_types.hpp>
#include <boost/date_time/posix_time/posix_time_types.hpp>
namespace turbodbc {
boost::posix_time::ptime const timestamp_epoch({1970, 1, 1}, {... | Add missing includes for Windows | Add missing includes for Windows
| C++ | mit | blue-yonder/turbodbc,blue-yonder/turbodbc,blue-yonder/turbodbc,blue-yonder/turbodbc |
81d6ef98e8a3e1a112cf2dc588e39f18e74da1a5 | source/parlex/src/abstract_syntax_tree.cpp | source/parlex/src/abstract_syntax_tree.cpp | #include "../include/parlex/detail/abstract_syntax_tree.hpp"
#include "graphviz_dot.hpp"
#include "parlex/builder.hpp"
#include "parlex/detail/grammar.hpp"
parlex::detail::ast_node::ast_node(match const & m, std::vector<ast_node> const & children, leaf const * l) : match(m), children(children), l(l) {}
std::string ... | #include "../include/parlex/detail/abstract_syntax_tree.hpp"
#include "graphviz_dot.hpp"
#include "parlex/builder.hpp"
#include "parlex/detail/grammar.hpp"
parlex::detail::ast_node::ast_node(match const & m, std::vector<ast_node> const & children, leaf const * l) : match(m), children(children), l(l) {}
std::string ... | Make the output of ast_node::to_dot give friendlier node names. | Make the output of ast_node::to_dot give friendlier node names.
| C++ | bsd-3-clause | coder0xff/Plange,coder0xff/Plange,coder0xff/Plange,coder0xff/Plange |
defc3357c64a03af3dec116609a9e34181026617 | src/DBMeter.cpp | src/DBMeter.cpp | #include <iostream>
#include <QtConcurrent>
#include <QCoreApplication>
#include <stdint.h>
#include <pulse/simple.h>
#include "DBMeter.hpp"
using namespace std;
DBMeter::DBMeter()
{
settings.setCodec("audio/PCM");
settings.setChannelCount(1);
settings.setSampleRate(16000);
recorder = new QAudioRecorder(this);
... | #include <iostream>
#include <QtConcurrent>
#include <QCoreApplication>
#include <stdint.h>
#include "DBMeter.hpp"
using namespace std;
DBMeter::DBMeter()
{
settings.setCodec("audio/PCM");
settings.setChannelCount(1);
settings.setSampleRate(16000);
recorder = new QAudioRecorder(this);
recorder->setAudioInput("... | Remove an include not needed | Remove an include not needed
| C++ | mit | LouJo/SailDBMeter |
76945fcf995cc6b1e6ba61e23080b4a096069d2d | src/Event.cpp | src/Event.cpp | // Copyright 2016 Zheng Xian Qiu
#include "Seeker.h"
namespace Seeker {
vector<ISubscriber*> Event::subscribers;
void Event::Refresh() {
SDL_Event ev;
while(SDL_PollEvent(&ev)) {
switch(ev.type) {
case SDL_KEYDOWN:
Dispatch(EventType::Key);
break;
case SDL_QUIT:... | // Copyright 2016 Zheng Xian Qiu
#include "Seeker.h"
#include<algorithm> // Prevent use C++17 std::remove
namespace Seeker {
vector<ISubscriber*> Event::subscribers;
void Event::Refresh() {
SDL_Event ev;
while(SDL_PollEvent(&ev)) {
switch(ev.type) {
case SDL_KEYDOWN:
Dispatch(Ev... | Fix compiler use wrong version std::remove | Fix compiler use wrong version std::remove
| C++ | apache-2.0 | elct9620/seeker,elct9620/seeker,elct9620/seeker |
4bdc5c46948f685c9d1bef7500571915aad76bfd | src/shogun/multiclass/ecoc/ECOCOVOEncoder.cpp | src/shogun/multiclass/ecoc/ECOCOVOEncoder.cpp | /*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* Written (W) 2012 Chiyuan Zhang
* Copyright (C) 2012 Chiyua... | /*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* Written (W) 2012 Chiyuan Zhang
* Copyright (C) 2012 Chiyua... | Fix bug in ECOC OvO encoder | Fix bug in ECOC OvO encoder
| C++ | bsd-3-clause | sorig/shogun,sorig/shogun,lisitsyn/shogun,besser82/shogun,shogun-toolbox/shogun,lambday/shogun,lisitsyn/shogun,besser82/shogun,sorig/shogun,lambday/shogun,lambday/shogun,besser82/shogun,geektoni/shogun,lambday/shogun,shogun-toolbox/shogun,sorig/shogun,Saurabh7/shogun,shogun-toolbox/shogun,lisitsyn/shogun,geektoni/shogu... |
96a55bd56bf09f45dee5f7fa2901fb9a0c0db991 | src/main.cpp | src/main.cpp | // Standard includes
#include <stdlib.h>
// OpenGL includes
#include <GL/glew.h>
#include <GLFW/glfw3.h>
#include "fluidDynamics.h"
void simulate() {
// We ping-pong back and forth between two buffers on the GPU
// u = advect(u);
// u = diffuse(u);
// u = addForces(u);
//
// p = computePress... | // Standard includes
#include <stdlib.h>
// OpenGL includes
#include <GL/glew.h>
#include <GLFW/glfw3.h>
#include "fluidDynamics.h"
#define DEFAULT_WIDTH 640
#define DEFAULT_HEIGHT 480
void simulate() {
// We ping-pong back and forth between two buffers on the GPU
// u = advect(u);
// u = diffuse(u);... | Call glewInit before trying to load shaders | Call glewInit before trying to load shaders
| C++ | mit | kvchen/flickflow,kvchen/flickflow |
21d0b886c134b2d9a372753d3acd8846a8079438 | src/main.cpp | src/main.cpp | #include "serialutil.h"
#include "usbutil.h"
#include "listener.h"
#include "signals.h"
#include "log.h"
#define VERSION_CONTROL_COMMAND 0x80
#define RESET_CONTROL_COMMAND 0x81
// USB
#define DATA_ENDPOINT 1
extern void reset();
void setup();
void loop();
const char* VERSION = "2.0-pre";
#ifdef __CHIPKIT__
SerialD... | #include "serialutil.h"
#include "usbutil.h"
#include "listener.h"
#include "signals.h"
#include "log.h"
#define VERSION_CONTROL_COMMAND 0x80
#define RESET_CONTROL_COMMAND 0x81
// USB
#define DATA_ENDPOINT 1
extern void reset();
void setup();
void loop();
const char* VERSION = "2.0-pre";
#ifdef __CHIPKIT__
SerialD... | Add newlines to control commands. | Add newlines to control commands.
| C++ | bsd-3-clause | mgiannikouris/vi-firmware,ene-ilies/vi-firmware,openxc/vi-firmware,ene-ilies/vi-firmware,openxc/vi-firmware,mgiannikouris/vi-firmware,ene-ilies/vi-firmware,ene-ilies/vi-firmware,openxc/vi-firmware,openxc/vi-firmware,mgiannikouris/vi-firmware,mgiannikouris/vi-firmware |
6d2231861c32f56c7d5cb6c27949eef22ee5f439 | lib/Target/AVR/TargetInfo/AVRTargetInfo.cpp | lib/Target/AVR/TargetInfo/AVRTargetInfo.cpp | //===-- AVRTargetInfo.cpp - AVR Target Implementation ---------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... | //===-- AVRTargetInfo.cpp - AVR Target Implementation ---------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... | Add backend name to AVR Target to enable runtime info to be fed back into TableGen | Add backend name to AVR Target to enable runtime info to be fed back into TableGen
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@318895 91177308-0d34-0410-b5e6-96231b3b80d8
| C++ | apache-2.0 | GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,apple/swift-llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,llvm-mirror/llvm,apple/swift-llvm,apple/swift-llvm,apple/swift-llvm,apple/swift-llvm,llvm-mirror/llvm,llvm-mirror/llvm,apple/swift-llvm,llvm-mirror/llv... |
1dfabddf008769d067edd0bd340657d6cbb292a4 | SSPSolution/SSPSolution/main.cpp | SSPSolution/SSPSolution/main.cpp | #include <SFML\Window.hpp>
int main()
{
sf::Window window(sf::VideoMode(800, 600), "SFML works!");
while (window.isOpen())
{
sf::Event event;
while (window.pollEvent(event))
{
if (event.type == sf::Event::Closed)
window.close();
}
window.display();
}
return 0;
} | #include <SFML\Window.hpp>
int main()
{
bool fullscreen = false;
sf::Window window(sf::VideoMode(800, 600), "SFML works!");
while (window.isOpen())
{
sf::Event event;
while (window.pollEvent(event))
{
if (event.type == sf::Event::Closed)
window.close();
if (event.type == sf::Event::KeyPressed) {... | ADD fullscreen option for sfml window, press F atm | ADD fullscreen option for sfml window, press F atm
| C++ | apache-2.0 | Chringo/SSP,Chringo/SSP |
7f84c2c4f7243380fb1ceb133cdd3b39266fc62b | test/some_unit_test.cpp | test/some_unit_test.cpp | #include "arithmetics.hpp"
#include "gtest/gtest.h"
TEST(AddTest, PerformsAdditionOnTwoIntegers) {
EXPECT_EQ(2, arithmetics::add(1, 1));
EXPECT_EQ(2, arithmetics::add_buggy(1, 1));
}
int main(int argc, char **argv) {
::testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
} | #include "arithmetics.hpp"
#include "gtest/gtest.h"
TEST(TestAdd, PerformsAdditionOnTwoIntegers) {
EXPECT_EQ(2, arithmetics::add(1, 1));
}
TEST(TestAdd, PerformsAdditionOnTwoIntegers_2) {
EXPECT_EQ(2, arithmetics::add_buggy(1, 1));
}
int main(int argc, char **argv) {
::testing::InitGoogleTest(&argc, argv);
r... | Split tests into 2 distict tests | Split tests into 2 distict tests
| C++ | mit | daixtrose/continuous-integration-demo,daixtrose/continuous-integration-demo |
31da751ab34c40a065f172d2c05d50bc717e92a7 | tests/themispp/main.cpp | tests/themispp/main.cpp | /*
* Copyright (c) 2015 Cossack Labs Limited
*
* 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 (c) 2015 Cossack Labs Limited
*
* 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... | Add secure comparator C++ wrapper test | Add secure comparator C++ wrapper test
| C++ | apache-2.0 | cossacklabs/themis,cossacklabs/themis,cossacklabs/themis,storojs72/themis,storojs72/themis,mnaza/themis,storojs72/themis,cossacklabs/themis,mnaza/themis,Lagovas/themis,Lagovas/themis,Lagovas/themis,storojs72/themis,cossacklabs/themis,mnaza/themis,Lagovas/themis,mnaza/themis,storojs72/themis,mnaza/themis,storojs72/themi... |
e5d9b27addf4a61063a99dcfb9a74b95f137050d | xchainer/python/device.cc | xchainer/python/device.cc | #include "xchainer/python/device.h"
#include <sstream>
#include "xchainer/device.h"
namespace xchainer {
namespace py = pybind11; // standard convention
void InitXchainerDevice(pybind11::module& m) {
py::class_<Device>(m, "Device").def("__repr__", [](Device device) {
std::ostringstream os;
os ... | #include "xchainer/python/device.h"
#include <sstream>
#include "xchainer/device.h"
namespace xchainer {
namespace py = pybind11; // standard convention
void InitXchainerDevice(pybind11::module& m) {
py::class_<Device>(m, "Device")
.def(py::init(&MakeDevice))
.def("__eq__", py::overload_cast<c... | Support Python-level Device ctor and comparison | Support Python-level Device ctor and comparison
| C++ | mit | hvy/chainer,wkentaro/chainer,chainer/chainer,wkentaro/chainer,okuta/chainer,jnishi/chainer,ktnyt/chainer,jnishi/chainer,keisuke-umezawa/chainer,okuta/chainer,niboshi/chainer,chainer/chainer,jnishi/chainer,chainer/chainer,keisuke-umezawa/chainer,keisuke-umezawa/chainer,chainer/chainer,ktnyt/chainer,jnishi/chainer,keisuk... |
3244780a0fb49898f1ffd1982135c38f28789170 | test/SemaTemplate/metafun-apply.cpp | test/SemaTemplate/metafun-apply.cpp | // RUN: clang-cc -fsyntax-only -verify %s
struct add_pointer {
template<typename T>
struct apply {
typedef T* type;
};
};
struct add_reference {
template<typename T>
struct apply {
typedef T& type; // expected-error{{cannot form a reference to 'void'}}
};
};
template<typename MetaFun, typename T>... | // RUN: clang-cc -fsyntax-only -verify %s
struct add_pointer {
template<typename T>
struct apply {
typedef T* type;
};
};
struct add_reference {
template<typename T>
struct apply {
typedef T& type; // expected-error{{cannot form a reference to 'void'}}
};
};
struct bogus {
struct apply {
ty... | Improve the dependent nested-name-specifier test a bit | Improve the dependent nested-name-specifier test a bit
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@68136 91177308-0d34-0410-b5e6-96231b3b80d8
| C++ | apache-2.0 | llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-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/cl... |
1e4092f5a8d0466ea29136985a1cb0be11e1dac0 | runtime/bin/crypto_fuchsia.cc | runtime/bin/crypto_fuchsia.cc | // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
#include "platform/globals.h"
#if defined(TARGET_OS_FUCHSIA)
#include "bin/crypto.h"
#include <magent... | // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
#include "platform/globals.h"
#if defined(TARGET_OS_FUCHSIA)
#include "bin/crypto.h"
#include <magent... | Use the new argument ordering for mx_cprng_draw | Use the new argument ordering for mx_cprng_draw
BUG=
R=abarth@google.com, zra@google.com
Review URL: https://codereview.chromium.org/2479683002 .
| C++ | bsd-3-clause | dart-lang/sdk,dart-archive/dart-sdk,dart-lang/sdk,dart-lang/sdk,dart-archive/dart-sdk,dartino/dart-sdk,dartino/dart-sdk,dart-lang/sdk,dartino/dart-sdk,dart-archive/dart-sdk,dart-lang/sdk,dartino/dart-sdk,dart-lang/sdk,dartino/dart-sdk,dartino/dart-sdk,dart-lang/sdk,dart-archive/dart-sdk,dart-archive/dart-sdk,dartino/da... |
0401e7ed8e8a462224706aa3dba9a8c867894ee9 | experimental/sksg/SkSGDraw.cpp | experimental/sksg/SkSGDraw.cpp | /*
* Copyright 2017 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "SkSGDraw.h"
#include "SkSGGeometryNode.h"
#include "SkSGInvalidationController.h"
#include "SkSGPaintNode.h"
namespace sksg {
Draw::Draw(sk_sp<GeometryNode> geome... | /*
* Copyright 2017 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "SkSGDraw.h"
#include "SkSGGeometryNode.h"
#include "SkSGInvalidationController.h"
#include "SkSGPaintNode.h"
namespace sksg {
Draw::Draw(sk_sp<GeometryNode> geome... | Adjust Draw node bounds for paint | [skotty] Adjust Draw node bounds for paint
TBR=
Change-Id: I88b3fe9c0ed4be2244b82d78995d6e27fa022296
Reviewed-on: https://skia-review.googlesource.com/93301
Reviewed-by: Florin Malita <a8262bf13ea8c26821e91ea9bca6740a77c96dcd@chromium.org>
Commit-Queue: Florin Malita <a8262bf13ea8c26821e91ea9bca6740a77c96dcd@chromium... | C++ | bsd-3-clause | rubenvb/skia,HalCanary/skia-hc,google/skia,google/skia,aosp-mirror/platform_external_skia,HalCanary/skia-hc,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,Hikari-no-Tenshi/android_external_skia,rubenvb/skia,Hikari-no-Tenshi/android_external_skia,google/skia,goog... |
66a1ccd3b28b8846d6ef4c66c442877716f2257e | source/gloperate-viewer/main.cpp | source/gloperate-viewer/main.cpp |
// [TODO] This belongs into the cmake platform files!!
#if defined(WIN32) && !defined(_DEBUG)
#pragma comment(linker, "/SUBSYSTEM:WINDOWS /entry:mainCRTStartup")
#endif
#include <memory>
#include <gloperate/ext-includes-begin.h>
#include <widgetzeug/dark_fusion_style.hpp>
#include <gloperate/ext-includes-end.h>
#i... |
// [TODO] This belongs into the cmake platform files!!
#if defined(WIN32) && !defined(_DEBUG)
#pragma comment(linker, "/SUBSYSTEM:WINDOWS /entry:mainCRTStartup")
#endif
#include <memory>
#include <gloperate/ext-includes-begin.h>
#include <widgetzeug/dark_fusion_style.hpp>
#include <gloperate/ext-includes-end.h>
#i... | Allow user to specify the initial painter on the commandline for gloperate-viewer | Allow user to specify the initial painter on the commandline for gloperate-viewer
| C++ | mit | lanice/gloperate,Beta-Alf/gloperate,hpicgs/gloperate,p-otto/gloperate,hpicgs/gloperate,lanice/gloperate,j-o/gloperate,hpicgs/gloperate,p-otto/gloperate,Beta-Alf/gloperate,Beta-Alf/gloperate,Beta-Alf/gloperate,j-o/gloperate,cginternals/gloperate,p-otto/gloperate,hpicgs/gloperate,hpicgs/gloperate,p-otto/gloperate,lanice/... |
ce1f2eda724037e782a2ef3d2eddc92d52c8e830 | src/ofxShadersFX.cpp | src/ofxShadersFX.cpp | #include "ofxShadersFX.h"
namespace ofxShadersFX {
Shader::Shader(ShaderType p_type)
{
setShaderType(p_type);
}
void Shader::begin() {
// The shader needs reload if not loaded
// or if modifications in attributes occurred since last frame
if (!m_shader.isLoaded() || m_n... | // The MIT License (MIT)
// Copyright (c) 2016 Alexandre Baron (Scylardor)
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, c... | Remove unnecessary "this->" (style issue) | Remove unnecessary "this->" (style issue)
| C++ | mit | Scylardor/ofxShadersFX |
64f4ec5b40a6668f171cbeabb5d05606e68f2d6c | teleport/teleport-palcu-back.cpp | teleport/teleport-palcu-back.cpp | #include <cstdio>
#include <algorithm>
using namespace std;
const int NMAX = 100000,
PASI_INFINITI = NMAX*2;
int v[NMAX],
nVector, sizeOfCheat;
int back(int pozitieCurenta, int cheatsAvailable) {
if (pozitieCurenta > nVector)
return PASI_INFINITI;
if (pozitieCurenta == nVector)
... | // @palcu
// InfoOltenia 2015, teleport, backtracking
#include <cstdio>
#include <algorithm>
using namespace std;
const int NMAX = 100000,
PASI_INFINITI = NMAX*2;
int v[NMAX],
nVector, sizeOfCheat;
int back(int pozitieCurenta, int cheatsAvailable) {
if (pozitieCurenta > nVector)
return P... | Add comments in the source code | Add comments in the source code
| C++ | mit | palcu/infooltenia,palcu/infooltenia,palcu/infooltenia,palcu/infooltenia,palcu/infooltenia,palcu/infooltenia |
73a48ad77c04987730a2469ef334a752dff94894 | test/Analysis/operator-calls.cpp | test/Analysis/operator-calls.cpp | // RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -analyzer-check-objc-mem -analyzer-experimental-checks -verify %s
struct X0 { };
bool operator==(const X0&, const X0&);
// PR7287
struct test { int a[2]; };
void t2() {
test p = {{1,2}};
test q;
q = p;
}
bool PR7287(X0 a, X0 b) {
return a ==... | // RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -analyzer-check-objc-mem -analyzer-experimental-checks -verify %s
struct X0 { };
bool operator==(const X0&, const X0&);
// PR7287
struct test { int a[2]; };
void t2() {
test p = {{1,2}};
test q;
q = p;
}
bool PR7287(X0 a, X0 b) {
return oper... | Make my test case test what it meant to | Make my test case test what it meant to
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@117974 91177308-0d34-0410-b5e6-96231b3b80d8
| C++ | apache-2.0 | llvm-mirror/clang,llvm-mirror/clang,apple/swift-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-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/cl... |
90a498b3354370891f266e18ac820ee70cb2e11d | src/level.cpp | src/level.cpp | /* Copyright 2012 Dietrich Epp <depp@zdome.net> */
#include "level.hpp"
#include "gamescreen.hpp"
using namespace LD24;
Level::~Level()
{ }
void Level::nextLevel()
{
screen.nextLevel();
}
void Level::setTipFlags(unsigned flags)
{
if (flags == m_tipflag)
return;
levelTips.clear();
for (int i =... | /* Copyright 2012 Dietrich Epp <depp@zdome.net> */
#include "level.hpp"
#include "gamescreen.hpp"
using namespace LD24;
Level::~Level()
{ }
void Level::nextLevel()
{
screen.nextLevel();
}
void Level::setTipFlags(unsigned flags)
{
if (flags == m_tipflag)
return;
levelTips.clear();
for (int i =... | Fix problems with multiple tips | Fix problems with multiple tips
| C++ | bsd-2-clause | depp/digital-generation,depp/digital-generation |
16cb55ea09c89d8ac894080126d2e60cefc74598 | _Deployment/nativeLaunchers/binaries/Linux/Rel.cpp | _Deployment/nativeLaunchers/binaries/Linux/Rel.cpp | // Rel native launcher for Linux.
#include <iostream>
#include <cstdlib>
#include <unistd.h>
#include <libgen.h>
#include <string>
#include <fstream>
#include <streambuf>
int main(int argc, char **argv)
{
// Convert first argument of argv[0] (full pathspec to this executable) to path where executable is... | // Rel native launcher for Linux.
#include <iostream>
#include <cstdlib>
#include <unistd.h>
#include <libgen.h>
#include <string>
#include <fstream>
#include <streambuf>
int main(int argc, char **argv)
{
// Convert first argument of argv[0] (full pathspec to this executable) to path where executable is... | Add double-quote delimiters to args. | Add double-quote delimiters to args. | C++ | apache-2.0 | DaveVoorhis/Rel,DaveVoorhis/Rel,DaveVoorhis/Rel,DaveVoorhis/Rel,DaveVoorhis/Rel |
5e4eb5d6c5098f8a339941b8d7a1863bb70dbce3 | content/public/common/context_menu_params.cc | content/public/common/context_menu_params.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 "content/public/common/context_menu_params.h"
namespace content {
const int32 CustomContextMenuContext::kCurrentRenderWidget = kint32max;
... | // 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 "content/public/common/context_menu_params.h"
namespace content {
const int32 CustomContextMenuContext::kCurrentRenderWidget = kint32max;
... | Initialize all members of ContextMenuParams in the ctor | Initialize all members of ContextMenuParams in the ctor
BUG=332271
R=thestig@chromium.org,joi@chromium.org
Review URL: https://codereview.chromium.org/128413002
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@243624 0039d316-1c4b-4281-b951-d872f2087c98
| C++ | bsd-3-clause | hgl888/chromium-crosswalk-efl,littlstar/chromium.src,Jonekee/chromium.src,markYoungH/chromium.src,ChromiumWebApps/chromium,Fireblend/chromium-crosswalk,M4sse/chromium.src,dushu1203/chromium.src,chuan9/chromium-crosswalk,fujunwei/chromium-crosswalk,Fireblend/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,Chilled... |
b4d73e63de296ead4e7fcddce1ee24abcd3cde7b | test/SemaCXX/int-ptr-cast-SFINAE.cpp | test/SemaCXX/int-ptr-cast-SFINAE.cpp | // RUN: %clang_cc1 -fsyntax-only -verify %s
// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++17
void foo(int* a, int *b) {
a -= b; // expected-warning {{incompatible integer to pointer conversion assigning to 'int *' from 'long'}}
}
template<typename T> T declval();
struct true_type { static const bool value = t... | // RUN: %clang_cc1 -fsyntax-only -verify %s
// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++17
void foo(int* a, int *b) {
a -= b; // expected-warning {{incompatible integer to pointer conversion assigning to 'int *' from}}
}
template<typename T> T declval();
struct true_type { static const bool value = true; };... | Fix test failure from r351495 | Fix test failure from r351495
The test has problems due to some platforms having a different type for
ptrdiff_t, so the error message is different. The error message doesn't
matter to the test for anything other than an incompatible intger to
pointer conversion, so this patch removes the integral type from the
expect... | C++ | apache-2.0 | llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/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,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-cl... |
d2ee5b69b984fd81504aee8e61f59140bda9151b | variants/platforms/stm32f3discovery/pwm_platform.cpp | variants/platforms/stm32f3discovery/pwm_platform.cpp | #include "variant/pwm_platform.hpp"
#include "hal.h"
static const PWMConfig motor_pwm_config = {
500000, // 500 kHz PWM clock frequency.
1000, // PWM period 2.0 ms.
NULL, // No callback.
{
{PWM_OUTPUT_ACTIVE_HIGH, NULL},
{PWM_OUTPUT_ACTIVE_HIGH, NULL},
{PWM_OUTPUT_ACTIVE_HIGH, NULL},
... | #include "variant/pwm_platform.hpp"
#include "hal.h"
static const PWMConfig motor_pwm_config = {
500000, // 500 kHz PWM clock frequency.
2000, // PWM period 2.0 ms.
NULL, // No callback.
{
{PWM_OUTPUT_ACTIVE_HIGH, NULL},
{PWM_OUTPUT_ACTIVE_HIGH, NULL},
{PWM_OUTPUT_ACTIVE_HIGH, NULL},
... | Fix PWM period on F3. | Fix PWM period on F3.
| C++ | mit | OSURoboticsClub/aerial_control,OSURoboticsClub/aerial_control,OSURoboticsClub/aerial_control |
d8c358bb22055e21e6e6d6608eea5dbd3186fc88 | test/basic.cpp | test/basic.cpp | #include "yebash.hpp"
#include "History.hpp"
#include "catch.hpp"
#include <sstream>
using namespace yb;
TEST_CASE( "No suggestions when history is empty", "[basic.empty_history]" ) {
std::stringstream ss;
History history;
history.read(ss);
HistorySuggestion suggestion(history);
auto c = yebash... | #include "yebash.hpp"
#include "History.hpp"
#include "catch.hpp"
#include <sstream>
using namespace yb;
TEST_CASE( "No suggestions when history is empty", "[basic.empty_history]" ) {
std::stringstream ss;
std::stringstream output;
History history;
history.read(ss);
HistorySuggestion suggestion(... | Update tests - allow checking the output | Update tests - allow checking the output
| C++ | mit | szborows/yebash,szborows/yebash |
296a695f9ba52aa19869617b446175b79a848757 | tests/main.cpp | tests/main.cpp | #include <QTest>
#include "mainwindow.h"
#include "test-suite.h"
QMap<QDateTime, QString> _log;
QMap<QString, QString> _md5;
mainWindow *_mainwindow;
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
int failed = 0;
for (QObject *suite : TestSuite::suites)
{
int ... | #include <QTest>
#include "mainwindow.h"
#include "test-suite.h"
QMap<QDateTime, QString> _log;
QMap<QString, QString> _md5;
mainWindow *_mainwindow;
int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);
int failed = 0;
for (QObject *suite : TestSuite::suites)
{
... | Replace gui application by core app to run in cli | Replace gui application by core app to run in cli
| C++ | apache-2.0 | Bionus/imgbrd-grabber,Bionus/imgbrd-grabber,YoukaiCat/imgbrd-grabber,Bionus/imgbrd-grabber,Bionus/imgbrd-grabber,Bionus/imgbrd-grabber,YoukaiCat/imgbrd-grabber,Bionus/imgbrd-grabber |
0665af7f0fdd6c6148fe8d23655f656b7e4c62a8 | src/Thread/Unix/ThreadImpl.cpp | src/Thread/Unix/ThreadImpl.cpp | #include "Thread/Unix/ThreadImpl.hh"
#include "Thread/ThreadException.hh"
namespace LilWrapper
{
ThreadImpl::ThreadImpl(Thread *thread)
{
this->_isActive = pthread_create(&this->_thread, NULL,
&ThreadImpl::entryPoint, thread) == 0;
if (!this->_isActive)
throw ThreadException("Thread Exception: "
... | #include "Thread/Unix/ThreadImpl.hh"
#include "Thread/ThreadException.hh"
namespace LilWrapper
{
ThreadImpl::ThreadImpl(Thread *thread)
{
this->_isActive = pthread_create(&this->_thread, NULL,
&ThreadImpl::entryPoint, thread) == 0;
if (!this->_isActive)
throw ThreadException("Thread Exception... | Set the Thread as inactive when terminating it. | Set the Thread as inactive when terminating it.
| C++ | mit | aliou/lilwrapper |
60952b86360ca0fdd58b96784b8bd8ebdf9904dd | src/ports/SkDebug_android.cpp | src/ports/SkDebug_android.cpp |
/*
* Copyright 2006 The Android Open Source Project
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "SkTypes.h"
static const size_t kBufferSize = 256;
#define LOG_TAG "skia"
#include <android/log.h>
void SkDebugf(const char format[], ...) {
... |
/*
* Copyright 2006 The Android Open Source Project
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "SkTypes.h"
static const size_t kBufferSize = 256;
#define LOG_TAG "skia"
#include <android/log.h>
static bool gSkDebugToStdOut = false;
ext... | Enable Android executables (like skia_launcher) to redirect SkDebugf output to stdout as well as the system logs. | Enable Android executables (like skia_launcher) to redirect SkDebugf output to stdout as well as the system logs.
Review URL: https://codereview.appspot.com/6733065
git-svn-id: e8541e15acce502a64c929015570ad1648e548cd@6059 2bbb7eff-a529-9590-31e7-b0007b416f81
| C++ | bsd-3-clause | hbwhlklive/color-emoji.skia,Hankuo/color-emoji.skia,Hankuo/color-emoji.skia,MatChung/color-emoji.skia,Frankie-666/color-emoji.skia,hbwhlklive/color-emoji.skia,Frankie-666/color-emoji.skia,hbwhlklive/color-emoji.skia,Frankie-666/color-emoji.skia,MatChung/color-emoji.skia,hbwhlklive/color-emoji.skia,Hankuo/color-emoji.sk... |
3293555b1516cc232b153ee7256a3f7a5a659928 | game/source/main.cpp | game/source/main.cpp | /*
* Copyright (c) 2016 Lech Kulina
*
* This file is part of the Realms Of Steel.
* For conditions of distribution and use, see copyright details in the LICENSE file.
*/
#include <cstdlib>
#include <boost/property_tree/info_parser.hpp>
#include <application/Logger.h>
#include <application/Application.h>
#include <... | /*
* Copyright (c) 2016 Lech Kulina
*
* This file is part of the Realms Of Steel.
* For conditions of distribution and use, see copyright details in the LICENSE file.
*/
#include <cstdlib>
#include <boost/property_tree/info_parser.hpp>
#include <application/Logger.h>
#include <application/Application.h>
#include <... | Initialize FileSystem and ResourcesCache from config file | Initialize FileSystem and ResourcesCache from config file
| C++ | apache-2.0 | lechkulina/RealmsOfSteel,lechkulina/RealmsOfSteel |
de19971dab19726b5b945ce9adc2c46591e5f11f | Assignment_4/main.cpp | Assignment_4/main.cpp | #include <iostream>
#include <cstlib>
#include <vector>
| #include <iostream>
#include <cstdlib>
#include <vector>
#include <bitset>
#include <cstring>
#include <string>
#include <fstream>
#include <cstdio>
#include "rand.h"
using namespace std;
class individual {
public:
int key[26];
float fit;
};
// user functions go here
int main() {
// get cipher from cin... | Use fscanf to read in file. | Use fscanf to read in file.
| C++ | mit | westrope/Evo-Comp,westrope/Evo-Comp |
ae360da2e066209b3cbd9d283b1efc5d36d60758 | src/person.cpp | src/person.cpp | #include <stdexcept>
#include "Person.h"
Person::Person(std::string name) {
if(name.empty()){
throw std::invalid_argument("Name can not be empty.");
}
this->name = name;
};
| #include <stdexcept>
#include "Person.h"
Person::Person(std::string name) {
if(name.empty()){
throw std::invalid_argument("Name cannot be empty.");
}
this->name = name;
};
| Add verification to Person constructor | Add verification to Person constructor
| C++ | unlicense | eariassoto/cpp-project-template |
ddaa482aed644f3f9bc5cab9386a0bdb01ca9834 | tests/main.cpp | tests/main.cpp | #include "gtest/gtest.h"
int main(int argc, char *argv[])
{
::testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
}
| #include "gtest/gtest.h"
class ThrowListener : public testing::EmptyTestEventListener
{
void OnTestPartResult(const testing::TestPartResult& result) override
{
if (result.type() == testing::TestPartResult::kFatalFailure)
{
throw testing::AssertionException(result);
}
}
};
int main(int argc, ch... | Make ASSERTs in helper functions fail the parent testcase | Make ASSERTs in helper functions fail the parent testcase
| C++ | apache-2.0 | iovisor/bpftrace,iovisor/bpftrace,iovisor/bpftrace,iovisor/bpftrace |
5778d3a6db0f740a9dcb77e2bf90e88067caffc2 | BoardMarker.cpp | BoardMarker.cpp | #include "BoardMarker.hpp"
BoardMarker::BoardMarker (void) : m(NONE), c(' ') {}
bool BoardMarker::apply_modifier(Modifier& m) {
if (this->m != NONE) {
return false;
}
this->m = m;
return true;
}
bool BoardMarker::set_char(char& c) {
if (this->c != ' ') {
return false;
}
this->c = toupper(c);
... | #include "BoardMarker.hpp"
BoardMarker::BoardMarker (void) : m(NONE), c(' ') {}
bool BoardMarker::apply_modifier(Modifier& m) {
if (this->m != NONE) {
return false;
}
this->m = m;
return true;
}
bool BoardMarker::set_char(char& c) {
if (this->c != ' ') {
return this->c == c;
}
this->c = toupper... | Allow set_char when char is the same - updating words | Allow set_char when char is the same - updating words
| C++ | mit | FreddieShoreditch/scrabble_bot,FreddieLindsey/scrabble_bot |
bc4c7d2359abdf3e17db96a1572ebd7ded2953ea | chrome/browser/ui/views/tabs/dock_info_views.cc | chrome/browser/ui/views/tabs/dock_info_views.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 "chrome/browser/ui/tabs/dock_info.h"
#include "chrome/browser/ui/views/tabs/tab.h"
#include "build/build_config.h"
#if !defined(OS_WIN)
// ... | // 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 "chrome/browser/ui/tabs/dock_info.h"
#include "chrome/browser/ui/views/tabs/tab.h"
#include "build/build_config.h"
#if defined(USE_AURA) ||... | Fix win_aura build enabling GetHotSpotDeltaY() in aura too. | views/tabs: Fix win_aura build enabling GetHotSpotDeltaY() in aura too.
BUG=125846
TBR=ben@chromium.org
NOTRY=true
Review URL: https://chromiumcodereview.appspot.com/10782009
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@146762 0039d316-1c4b-4281-b951-d872f2087c98
| C++ | bsd-3-clause | mogoweb/chromium-crosswalk,Chilledheart/chromium,patrickm/chromium.src,Just-D/chromium-1,junmin-zhu/chromium-rivertrail,Pluto-tv/chromium-crosswalk,ltilve/chromium,Jonekee/chromium.src,timopulkkinen/BubbleFish,mohamed--abdel-maksoud/chromium.src,zcbenz/cefode-chromium,dednal/chromium.src,crosswalk-project/chromium-cros... |
76d8e9464b99342e6f56cfa118846b14cf47bfdf | src/messagedirector/messagedirector.cpp | src/messagedirector/messagedirector.cpp | #include "messagedirector.h"
#include "../core/config.h"
ConfigVariable<std::string> bind_addr("messagedirector/bind", "unspecified");
MessageDirector MessageDirector::singleton;
void MessageDirector::InitializeMD()
{
if(!m_initialized)
{
if(bind_addr.get_val() != "unspecified")
{
}
}
}
MessageDirector::Mes... | #include "../core/global.h"
#include "messagedirector.h"
#include "../core/config.h"
using boost::asio::ip::tcp; // I don't want to type all of that god damned shit
ConfigVariable<std::string> bind_addr("messagedirector/bind", "unspecified");
MessageDirector MessageDirector::singleton;
void MessageDirector::Initializ... | Put in some placeholder synhronous accept code | Put in some placeholder synhronous accept code
| C++ | bsd-3-clause | ketoo/Astron,pizcogirl/Astron,ketoo/Astron,blindsighttf2/Astron,blindsighttf2/Astron,ketoo/Astron,blindsighttf2/Astron,blindsighttf2/Astron,pizcogirl/Astron,pizcogirl/Astron,pizcogirl/Astron,ketoo/Astron |
389f90f5d74e763ef96ce7a20893d5705658a568 | test/std/thread/futures/futures.async/async.fail.cpp | test/std/thread/futures/futures.async/async.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 additional 'UNSUPPORTED' to the test case. | Add additional 'UNSUPPORTED' to the test case.
git-svn-id: 756ef344af921d95d562d9e9f9389127a89a6314@318897 91177308-0d34-0410-b5e6-96231b3b80d8
| C++ | apache-2.0 | llvm-mirror/libcxx,llvm-mirror/libcxx,llvm-mirror/libcxx,llvm-mirror/libcxx,llvm-mirror/libcxx |
6a15bde84fd37d5599fa4e298d06ed2c52243bac | test/CodeGenCXX/debug-info-limit.cpp | test/CodeGenCXX/debug-info-limit.cpp | // RUN: %clang -emit-llvm -g -S %s -o - | FileCheck %s
// TAG_member is used to encode debug info for 'z' in A.
// CHECK: TAG_member
class A {
public:
int z;
};
A *foo (A* x) {
A *a = new A(*x);
return a;
}
| // RUN: %clang -emit-llvm -g -S %s -o - | FileCheck %s
// TAG_member is used to encode debug info for 'z' in A.
// CHECK: TAG_member
class A {
public:
int z;
};
A *foo (A* x) {
A *a = new A(*x);
return a;
}
// Verify that we're not emitting a full definition of B in limit debug mode.
// RUN: %clang -emit-llvm... | Add a test to verify that -flimit-debug-info is working in some way. | Add a test to verify that -flimit-debug-info is working in some way.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@181963 91177308-0d34-0410-b5e6-96231b3b80d8
| C++ | apache-2.0 | apple/swift-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,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-cl... |
dbb88fbe6bfebc26e003aea61ff693d44b691fe7 | Misc/OpenNI_Streaming_pleasedontlookatme/main.cpp | Misc/OpenNI_Streaming_pleasedontlookatme/main.cpp | #include <opencv2/opencv.hpp>
#include <unistd.h>
int main(int argc, char** argv){
if(argc!=2){
std::cout << "Nope.\n";
return -1;
}
cv::VideoCapture _capture(CV_CAP_OPENNI);
std::cout << "Started streaming data to main system..\n";
int c=0;
while(1){
cv::Mat depthMap, rgb;
usleep(500000);
... | #include <opencv2/opencv.hpp>
#include <opencv/highgui.h>
#include <unistd.h>
int main(int argc, char** argv){
if(argc!=2){
std::cout << "Nope.\n";
return -1;
}
cv::VideoCapture _capture(CV_CAP_OPENNI);
std::cout << "Started streaming data to main system..\n";
int c=0;
cv::namedWindow("DEPTH");
wh... | Make a more robust streamer | Make a more robust streamer
| C++ | mpl-2.0 | conte91/JG,conte91/JG,conte91/JG,conte91/JG |
4d2d1803e922dc1315520fda4325deebc2602551 | main.cpp | main.cpp | /* This file is part of Fabula.
Copyright (C) 2010 Mike McQuaid <mike@mikemcquaid.com>
Fabula is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your opti... | /* This file is part of Fabula.
Copyright (C) 2010 Mike McQuaid <mike@mikemcquaid.com>
Fabula is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your opti... | Fix Windows window icon failure. | Fix Windows window icon failure.
| C++ | mit | mikemcquaid/Fabula |
b8b41ed0945cbb83031836d89698ba6f68c203e1 | imageviewer.cpp | imageviewer.cpp | #include "imageviewer.h"
#include "ui_imageviewer.h"
ImageViewer::ImageViewer(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::ImageViewer)
{
ui->setupUi(this);
QImage image("/Users/Wojtek/Pictures/Three-eyed_crow.jpg");
ui->imageLabel->setPixmap(QPixmap::fromImage(image));
}
ImageViewer::~Imag... | #include "imageviewer.h"
#include "ui_imageviewer.h"
ImageViewer::ImageViewer(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::ImageViewer)
{
ui->setupUi(this);
ui->imageLabel->setBackgroundRole(QPalette::Base);
ui->imageLabel->setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Ignored);
ui->i... | Set imageLabel and scrollArea properties | Set imageLabel and scrollArea properties
| C++ | mit | wojtodzio/ImageViewer |
ba8c595400abb9c554fc26cbfd9fca3e5ecf97d4 | rpi/src/platform_rpi.cpp | rpi/src/platform_rpi.cpp | #include <stdio.h>
#include <stdarg.h>
#include <iostream>
#include <fstream>
#include <string>
#include "platform.h"
void logMsg(const char* fmt, ...) {
va_list args;
va_start(args, fmt);
vfprintf(stderr, fmt, args);
va_end(args);
}
std::string stringFromResource(const char* _path) {
std::string... | #include <stdio.h>
#include <stdarg.h>
#include <iostream>
#include <fstream>
#include <string>
#include "platform.h"
void logMsg(const char* fmt, ...) {
va_list args;
va_start(args, fmt);
vfprintf(stderr, fmt, args);
va_end(args);
}
void requestRender() {
// TODO: implement non-continuous render... | Fix missing symbols for RPi | Fix missing symbols for RPi
Currently the Pi will ignore requests for non-continuous rendering
| C++ | mit | karimnaaji/tangram-es,quitejonny/tangram-es,cleeus/tangram-es,tangrams/tangram-es,tangrams/tangram-es,tangrams/tangram-es,cleeus/tangram-es,xvilan/tangram-es,hjanetzek/tangram-es,quitejonny/tangram-es,cleeus/tangram-es,cleeus/tangram-es,karimnaaji/tangram-es,xvilan/tangram-es,quitejonny/tangram-es,tangrams/tangram-es,q... |
bb5eef351843697a9edb5af1fe4eab8cb8dcf08f | dsim/test/dsim/simulate.cpp | dsim/test/dsim/simulate.cpp | // STL
#include <cassert>
#include <iostream>
#include <sstream>
#include <fstream>
#include <string>
// DSIM
#include <dsim/DSIM_Service.hpp>
#include <dsim/config/dsim-paths.hpp>
// ///////// M A I N ////////////
int main (int argc, char* argv[]) {
try {
// Output log File
std::string lLogFilename ("... | // STL
#include <cassert>
#include <iostream>
#include <sstream>
#include <fstream>
#include <string>
// DSIM
#include <dsim/DSIM_Service.hpp>
#include <dsim/config/dsim-paths.hpp>
// ///////// M A I N ////////////
int main (int argc, char* argv[]) {
try {
// Schedule input file name
std::string lSched... | Update the test with the schedule input filename. | [Test] Update the test with the schedule input filename.
git-svn-id: 543967457c07248534c6537446d108cd8c20cdb5@33 e67a024f-d144-4c12-b96e-b057add9d369
| C++ | lgpl-2.1 | airsim/tvlsim,airsim/tvlsim,airsim/tvlsim,airsim/tvlsim,airsim/tvlsim,airsim/tvlsim,airsim/tvlsim,airsim/tvlsim,airsim/tvlsim |
d77b6c7f652c452e2c78030f29f71700d9bcf7f5 | Sources/hspp/Tasks/SimpleTasks/IncludeTask.cpp | Sources/hspp/Tasks/SimpleTasks/IncludeTask.cpp | // Copyright (c) 2018 Chris Ohk, Youngjoong Kim, SeungHyun Jeon
// We are making my contributions/submissions to this project solely in our
// personal capacity and are not conveying any rights to any intellectual
// property of any third parties.
#include <hspp/Tasks/SimpleTasks/IncludeTask.hpp>
namespace Hearthsto... | // Copyright (c) 2018 Chris Ohk, Youngjoong Kim, SeungHyun Jeon
// We are making my contributions/submissions to this project solely in our
// personal capacity and are not conveying any rights to any intellectual
// property of any third parties.
#include <hspp/Tasks/SimpleTasks/IncludeTask.hpp>
#include <stdexcept... | Correct compile error on Linux and macOS | fix: Correct compile error on Linux and macOS
- no matching function for call to 'std::exception::exception(const char [16])' | C++ | mit | Hearthstonepp/Hearthstonepp,Hearthstonepp/Hearthstonepp |
250cac0ecbb56e5ead8dd05fe1094bd9bc2efacb | test/t/basic/runtest.cpp | test/t/basic/runtest.cpp |
#include <test.hpp>
TEST_CASE("basic") {
SECTION("default constructed pbf message is okay") {
mapbox::util::pbf item;
REQUIRE(!item.next());
}
SECTION("empty buffer is okay") {
std::string buffer;
mapbox::util::pbf item(buffer.data(), 0);
REQUIRE(!item.next());
... |
#include <test.hpp>
TEST_CASE("basic") {
SECTION("default constructed pbf message is okay") {
mapbox::util::pbf item;
REQUIRE(!item.next());
}
SECTION("empty buffer is okay") {
std::string buffer;
mapbox::util::pbf item(buffer.data(), 0);
REQUIRE(!item); // test o... | Add tests for operator bool(). | Add tests for operator bool().
| C++ | bsd-2-clause | mapbox/pbf.hpp,mapbox/pbf.hpp,mapbox/pbf.hpp |
3a7d7381dd7dca6bbc9d5fd48d2227cb18e2ede8 | tests/test_lua.cpp | tests/test_lua.cpp | #include "Rainback.hpp"
#include <lua-cxx/LuaEnvironment.hpp>
#include <lua-cxx/LuaValue.hpp>
#include <QFile>
int main(int argc, char* argv[])
{
Lua lua;
rainback::Rainback rainback(lua);
std::string srcdir(getenv("srcdir"));
QFile testRunner(QString(srcdir.c_str()) + "/test_lua.lua");
return (b... | #include "Rainback.hpp"
#include <lua-cxx/LuaEnvironment.hpp>
#include <lua-cxx/LuaValue.hpp>
#include <QFile>
#include <QCoreApplication>
int main(int argc, char* argv[])
{
QCoreApplication app(argc, argv);
Lua lua;
rainback::Rainback rainback(lua);
std::string srcdir(getenv("srcdir"));
QFile t... | Create a QCoreApplication when testing Lua | Create a QCoreApplication when testing Lua
| C++ | mit | Thonik/rainback |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.