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 |
|---|---|---|---|---|---|---|---|---|---|
897092fce4cd6b790130737fabf9c5ec6669d7c3 | courgette/crc.cc | courgette/crc.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.
// Calculate Crc by calling CRC method in LZMA SDK
#include "courgette/crc.h"
extern "C" {
#include "third_party/lzma_sdk/7zCrc.h"
}
namespace cour... | // 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 "courgette/crc.h"
#ifdef COURGETTE_USE_CRC_LIB
# include "zlib.h"
#else
extern "C" {
# include "third_party/lzma_sdk/7zCrc.h"
}
#endif
#i... | Use a different define to decide which CRC library to use. | Use a different define to decide which CRC library to use.
Change 8569018 used a #ifdef to conditionally decide which external
library to use for Crc calculation. It used OS_CHROMIUMOS to tell
if the build was targetted at Chromium OS.
However, it broke Chromium OS builds of the full Chromium tree in
some cases (heap... | C++ | bsd-3-clause | yitian134/chromium,ropik/chromium,ropik/chromium,ropik/chromium,gavinp/chromium,ropik/chromium,gavinp/chromium,yitian134/chromium,ropik/chromium,yitian134/chromium,adobe/chromium,yitian134/chromium,adobe/chromium,yitian134/chromium,adobe/chromium,yitian134/chromium,gavinp/chromium,adobe/chromium,yitian134/chromium,ropi... |
d3c49a141834030ab3e476a060cdf823574ce433 | software/source/main.cpp | software/source/main.cpp | // coding: utf-8
#include "hardware.hpp"
// system tick timer
ISR(TIMER2_COMPA_vect)
{
xpcc::Clock::increment();
}
// main function \o/
int
main(void)
{
// set the led pins
initializeLeds();
RedLedPin::setOutput();
GreenLedPin::setOutput();
BlueLedPin::setOutput();
LightSensorPin::setInput();
// set up the ... | // coding: utf-8
#include "hardware.hpp"
// system tick timer
ISR(TIMER2_COMPA_vect)
{
xpcc::Clock::increment();
}
// main function \o/
int
main(void)
{
// set the led pins
initializeLeds();
RedLedPin::setOutput();
GreenLedPin::setOutput();
BlueLedPin::setOutput();
LightSensorPin::setInput();
// set up the ... | Set Uart Baudrate to 38.4kBaud, for minimal error. | Set Uart Baudrate to 38.4kBaud, for minimal error. | C++ | bsd-2-clause | salkinium/lumicolor |
5b3adcabd4a55fe15926e18f62e79d438ff76156 | test/CodeGenCXX/microsoft-abi-try-throw.cpp | test/CodeGenCXX/microsoft-abi-try-throw.cpp | // FIXME: Disabled until catch IRgen change lands.
// RUNX: %clang_cc1 -emit-llvm %s -o - -triple=i386-pc-win32 -mconstructor-aliases -fcxx-exceptions -fexceptions -fno-rtti -DTRY | FileCheck %s -check-prefix=TRY
// RUNX: %clang_cc1 -emit-llvm %s -o - -triple=i386-pc-win32 -mconstructor-aliases -fcxx-exceptions -fexc... | // FIXME: Disabled until catch IRgen change lands.
// RUNX: %clang_cc1 -emit-llvm %s -o - -triple=i386-pc-win32 -mconstructor-aliases -fcxx-exceptions -fexceptions -fno-rtti -DTRY | FileCheck %s -check-prefix=TRY
// RUN: %clang_cc1 -emit-llvm %s -o - -triple=i386-pc-win32 -mconstructor-aliases -fcxx-exceptions -fexce... | Disable the right RUN line | Disable the right RUN line
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@231098 91177308-0d34-0410-b5e6-96231b3b80d8
| C++ | apache-2.0 | llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/cl... |
ed3723864833af87abab0a36fdc66df99029bfae | examples/demo/demo.cpp | examples/demo/demo.cpp | #include <iostream>
#include <unistd.h>
int age = 23;
int main()
{
sleep(2);
std::cout << "I am Adrian.\n" << "Age: " << age << "\n";
return 0;
} | #include <iostream>
#include <unistd.h>
int age = 23;
int main()
{
sleep(2);
std::cout << "I am Adrian.\n" << "Age: " << age << "\n";
return 0;
}
| Add newline at the end of the file | Add newline at the end of the file | C++ | mit | SilentControl/mangler,stefanmirea/mangler |
258f850010c5033e5ef06138343e0f8a2c00387a | test/src/test-util.cpp | test/src/test-util.cpp | /*
* SOPMQ - Scalable optionally persistent message queue
* Copyright 2014 InWorldz, LLC
*
* 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-... | /*
* SOPMQ - Scalable optionally persistent message queue
* Copyright 2014 InWorldz, LLC
*
* 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-... | Add additional test for the random bytes utility | Add additional test for the random bytes utility
| C++ | apache-2.0 | zwagoth/sopmq,InWorldz/sopmq,InWorldz/sopmq,zwagoth/sopmq,zwagoth/sopmq,InWorldz/sopmq,zwagoth/sopmq,InWorldz/sopmq |
64f49bd30cb343cd7edf73d1551842c431e39625 | src/runtime/main.cc | src/runtime/main.cc | // Copyright (C) 2015 Jack Maloney. All Rights Reserved.
//
// This Source Code Form is subject to the terms of the Mozilla Public License,
// v. 2.0. If a copy of the MPL was not distributed with this file, You can
// obtain one at http://mozilla.org/MPL/2.0/.
#include "voltz-internal.h"
double StartupTime;
int mai... | // Copyright (C) 2015 Jack Maloney. All Rights Reserved.
//
// This Source Code Form is subject to the terms of the Mozilla Public License,
// v. 2.0. If a copy of the MPL was not distributed with this file, You can
// obtain one at http://mozilla.org/MPL/2.0/.
#include "voltz-internal.h"
#include <ctime>
#include <cs... | Add needed header for travis-ci build | Add needed header for travis-ci build
| C++ | mpl-2.0 | jmmaloney4/voltz,jmmaloney4/voltz |
c8a24d68b6fab5941172dbfdf22ad0d2c68346b6 | exercise_1.4/exercise_1.4.cpp | exercise_1.4/exercise_1.4.cpp | #include<iostream>
int main()
{
int value1 = 0, value2 = 0;
std::cin >> value1 >> value2;
std::cout << "The product of " << value1 << " and " << value2 << " equals " << value1 + value2 << std::endl;
return 0;
}
| #include<iostream>
int main()
{
int value1 = 0, value2 = 0;
std::cin >> value1 >> value2;
std::cout << "The product of " << value1 << " and " << value2 << " equals " << value1 * value2 << std::endl;
return 0;
}
| Fix * instead of + | Fix * instead of +
| C++ | mit | paulkramme/cppprimer |
fe3dc729ddc412f89443b04b39d238521aa53776 | src/os/windows/logit.cpp | src/os/windows/logit.cpp | /*
* Copyright (c) 2003-2016 Rony Shapiro <ronys@pwsafe.org>.
* All rights reserved. Use of the code is allowed under the
* Artistic License 2.0 terms, as specified in the LICENSE file
* distributed with this code, or available from
* http://www.opensource.org/licenses/artistic-license-2.0.php
*/
/**
* \file Windows-... | /*
* Copyright (c) 2003-2016 Rony Shapiro <ronys@pwsafe.org>.
* All rights reserved. Use of the code is allowed under the
* Artistic License 2.0 terms, as specified in the LICENSE file
* distributed with this code, or available from
* http://www.opensource.org/licenses/artistic-license-2.0.php
*/
/**
* \file Windows-... | Disable telemetry installed by Microsoft in VS2015 | Disable telemetry installed by Microsoft in VS2015
See https://www.reddit.com/r/cpp/comments/4ibauu/visual_studio_adding_telemetry_function_calls_to/
Thanks to pm_kan for pointing this out.
| C++ | artistic-2.0 | Sp1l/pwsafe,Sp1l/pwsafe,Sp1l/pwsafe,Sp1l/pwsafe,Sp1l/pwsafe,Sp1l/pwsafe,Sp1l/pwsafe,Sp1l/pwsafe |
317002b90fe4e3d6bd53a1c02d5fb10e46d9415f | tests/compiler/fconv.cpp | tests/compiler/fconv.cpp | #include "output.h"
Output output;
float a = 123.0;
int b = 79;
unsigned int c = 24;
int main()
{
float d = b;
float e = c;
output << (int) a; // CHECK: 0x0000007b
output << (unsigned int) a; // CHECK: 0x0000007b
output << (int) d; // CHECK: 0x0000004f
// output << (int) e; // XXX should be 0x18, but is... | #include "output.h"
Output output;
float a = 123.0;
int b = 79;
unsigned int c = 24;
unsigned int f = 0x81234000;
int main()
{
float d = b;
float e = c;
float g = f;
output << (int) a; // CHECK: 0x0000007b
output << (unsigned int) a; // CHECK: 0x0000007b
output << (int) d; // CHECK: 0x0000004f
output <<... | Add test cases for unsigned int to floating point | Add test cases for unsigned int to floating point
| C++ | apache-2.0 | jbush001/NyuziProcessor,FulcronZ/NyuziProcessor,jbush001/NyuziProcessor,jbush001/NyuziProcessor,hoangt/NyuziProcessor,jbush001/NyuziProcessor,jbush001/NyuziProcessor,hoangt/NyuziProcessor,FulcronZ/NyuziProcessor,hoangt/NyuziProcessor,hoangt/NyuziProcessor,jbush001/NyuziProcessor,FulcronZ/NyuziProcessor,FulcronZ/NyuziPr... |
c55453dc24d3f07065739a9f99a9b1fcad6715c9 | test/Profile/cxx-indirect-call.cpp | test/Profile/cxx-indirect-call.cpp | // Check the value profiling instrinsics emitted by instrumentation.
// RUN: %clangxx %s -o - -emit-llvm -S -fprofile-instr-generate -mllvm -enable-value-profiling -fexceptions -target %itanium_abi_triple | FileCheck %s
void (*foo) (void);
int main(int argc, const char *argv[]) {
// CHECK: [[REG1:%[0-9]+]] = load v... | // Check the value profiling instrinsics emitted by instrumentation.
// RUN: %clang_cc1 %s -o - -emit-llvm -fprofile-instrument=clang -mllvm -enable-value-profiling -fexceptions -fcxx-exceptions -triple %itanium_abi_triple | FileCheck %s
void (*foo) (void);
int main(int argc, const char *argv[]) {
// CHECK: [[REG1:... | Fix another use of the driver. | [profile] Fix another use of the driver.
Follow-on to r267262.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@267263 91177308-0d34-0410-b5e6-96231b3b80d8
| C++ | apache-2.0 | apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/cl... |
73d905f2ebbc523168a120a4e2ac4fc746d56fe7 | code/Modules/HTTP/UnitTests/HTTPFileSystemTest.cc | code/Modules/HTTP/UnitTests/HTTPFileSystemTest.cc | //------------------------------------------------------------------------------
// HTTPFileSystemTest.cc
// Test HTTP file system functionality.
//------------------------------------------------------------------------------
#include "Pre.h"
#include "UnitTest++/src/UnitTest++.h"
#include "Core/Core.h"
#include "Co... | //------------------------------------------------------------------------------
// HTTPFileSystemTest.cc
// Test HTTP file system functionality.
//------------------------------------------------------------------------------
#include "Pre.h"
#include "UnitTest++/src/UnitTest++.h"
#include "Core/Core.h"
#include "Co... | Disable HTTPTest if 'headless', seems to hang travis-ci now | Disable HTTPTest if 'headless', seems to hang travis-ci now
| C++ | mit | aonorin/oryol,floooh/oryol,floooh/oryol,aonorin/oryol,floooh/oryol,aonorin/oryol,aonorin/oryol,floooh/oryol,floooh/oryol,aonorin/oryol,aonorin/oryol,floooh/oryol,aonorin/oryol |
156b142583ceeee9c10e34aff5f8da769b38a2d4 | test/cpp/bounds_inference/test.cpp | test/cpp/bounds_inference/test.cpp | #include <Halide.h>
#include <sys/time.h>
using namespace Halide;
double currentTime() {
timeval t;
gettimeofday(&t, NULL);
return t.tv_sec * 1000.0 + t.tv_usec / 1000.0f;
}
int main(int argc, char **argv) {
Func f, g, h; Var x, y;
h(x) = x;
g(x) = h(x-1) + h(x+1);
f(x, y) = (g(x-1)... | #include <Halide.h>
using namespace Halide;
int main(int argc, char **argv) {
Func f, g, h; Var x, y;
h(x) = x;
g(x) = h(x-1) + h(x+1);
f(x, y) = (g(x-1) + g(x+1)) + y;
h.root();
g.root();
if (use_gpu()) {
f.cudaTile(x, y, 16, 16);
g.cudaTile(x, 128);
h.cudaT... | Clear spurious timing code from bounds_interence | Clear spurious timing code from bounds_interence
| C++ | mit | jiawen/Halide,fengzhyuan/Halide,psuriana/Halide,smxlong/Halide,jiawen/Halide,mcanthony/Halide,jiawen/Halide,kenkuang1213/Halide,rodrigob/Halide,smxlong/Halide,ronen/Halide,myrtleTree33/Halide,delcypher/Halide,tdenniston/Halide,ronen/Halide,dan-tull/Halide,tdenniston/Halide,dan-tull/Halide,mcanthony/Halide,tdenniston/Ha... |
84edc6edeca2d5534c12a87df90cd684dfe9918d | src/common/species_dialog.cc | src/common/species_dialog.cc | #include "fish_detector/common/species_dialog.h"
#include "ui_species_dialog.h"
namespace fish_detector {
SpeciesDialog::SpeciesDialog(QWidget *parent)
: QDialog(parent)
, ui_(new Ui::SpeciesDialog) {
ui_->setupUi(this);
}
void SpeciesDialog::on_ok_clicked() {
}
void SpeciesDialog::on_cancel_clicked() {
}
v... | #include "fish_detector/common/species_dialog.h"
#include "ui_species_dialog.h"
namespace fish_detector {
SpeciesDialog::SpeciesDialog(QWidget *parent)
: QDialog(parent)
, ui_(new Ui::SpeciesDialog) {
ui_->setupUi(this);
}
void SpeciesDialog::on_ok_clicked() {
accept();
}
void SpeciesDialog::on_cancel_clic... | Add implementation for adding/removing subspecies functions | Add implementation for adding/removing subspecies functions
| C++ | mit | BGWoodward/FishDetector |
772d7b44ea5c540c341694564e7b282093dd4511 | Python/Product/DebuggerHelper/dllmain.cpp | Python/Product/DebuggerHelper/dllmain.cpp | /* ****************************************************************************
*
* Copyright (c) Microsoft Corporation.
*
* This source code is subject to terms and conditions of the Apache License, Version 2.0. A
* copy of the license can be found in the License.html file at the root of this distribution.... | /* ****************************************************************************
*
* Copyright (c) Microsoft Corporation.
*
* This source code is subject to terms and conditions of the Apache License, Version 2.0. A
* copy of the license can be found in the License.html file at the root of this distribution.... | Fix mixed-mode debugging on release PTVS builds. | Fix mixed-mode debugging on release PTVS builds.
| C++ | apache-2.0 | christer155/PTVS,crwilcox/PTVS,Habatchii/PTVS,crwilcox/PTVS,ChinaQuants/PTVS,xNUTs/PTVS,fivejjs/PTVS,MetSystem/PTVS,msunardi/PTVS,msunardi/PTVS,DinoV/PTVS,int19h/PTVS,int19h/PTVS,ChinaQuants/PTVS,Microsoft/PTVS,int19h/PTVS,gomiero/PTVS,Habatchii/PTVS,bolabola/PTVS,dut3062796s/PTVS,MetSystem/PTVS,bolabola/PTVS,fjxhkj/PT... |
6dbbb8a945ae75d542f61ae00d58df14e306245f | src/il/GlobalArray.cpp | src/il/GlobalArray.cpp | //=======================================================================
// Copyright Baptiste Wicht 2011.
// 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.
// 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)
//=====================================================... | Include the size of the array in the array memory layout | Include the size of the array in the array memory layout
| C++ | mit | wichtounet/eddic,wichtounet/eddic,vogelsgesang/eddic,vogelsgesang/eddic,wichtounet/eddic,vogelsgesang/eddic |
933433f59effa309f99f2822ff94bc35a0e4d8f6 | src/data.cpp | src/data.cpp | /*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file is part of the wikidata_cpp project:
* https://github.com/radupopescu/wikidata_cpp
*/
#inclu... | /*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file is part of the wikidata_cpp project:
* https://github.com/radupopescu/wikidata_cpp
*/
#inclu... | Fix typo in include due to case insensitivity | Fix typo in include due to case insensitivity
| C++ | mpl-2.0 | radupopescu/wikidata_cpp,radupopescu/wikidata_cpp,radupopescu/wikidata_cpp |
b1c564b42c585023445898c21b55379ee0a68225 | test/test_imu.cpp | test/test_imu.cpp | #include <ros/ros.h>
#include <sensor_msgs/Imu.h>
int main(int argc, char **argv) {
// Initialize ROS
ros::init(argc, argv, "test_imu");
ros::NodeHandle nh;
// Create a publisher object
ros::Publisher imuPub = nh.advertise<sensor_msgs::Imu>("imu/data",1);
// Create an Imu message object
sensor_msgs::Imu... | #include <ros/ros.h>
#include <sensor_msgs/Imu.h>
int main(int argc, char **argv) {
// Initialize ROS
ros::init(argc, argv, "test_imu");
ros::NodeHandle nh;
ros::NodeHandle private_nh("~");
// Create variables for yaw rate
double yawRate;
if(!private_nh.getParam("rate", yawRate)) {
yawRate = 0;
... | Use paramter to set yaw rate. | Use paramter to set yaw rate.
| C++ | mit | cwrucutter/snowmower_localization |
33201f84f01a3fb2b50d6d223542148a2c5c9b9a | src/main.cpp | src/main.cpp | /// \file main.cpp
#include "HelloTriangleApplication.hpp"
#include "VDeleter.hpp"
// waf-generated header
#include "config.hpp"
#define DOCTEST_CONFIG_IMPLEMENT
#include "doctest.h"
#define GLFW_INCLUDE_VULKAN
#include <GLFW/glfw3.h>
#include <iostream>
#include <string>
int main(int argc, char* argv[])
{
i... | /// \file main.cpp
#include "HelloTriangleApplication.hpp"
#include "VDeleter.hpp"
// waf-generated header
#include "config.hpp"
#define DOCTEST_CONFIG_IMPLEMENT
#include "doctest.h"
#define GLFW_INCLUDE_VULKAN
#include <GLFW/glfw3.h>
#include <iostream>
#include <string>
int main(int argc, char* argv[])
{
i... | Rename 'res' variable to 'test_result' | Rename 'res' variable to 'test_result'
| C++ | mit | atimholt/going-through-Vulkan-Tutorial |
676c751ed7e767f8bc7f6fb28477d8ba338ee01d | 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[])
{
QScopedPointer<QGuiApplication> app(SailfishApp::application(argc, argv));
QScopedPointer<QQuickView> view(Sailfi... | Remove comments originating from Helloworld Pro... | Remove comments originating from Helloworld Pro...
| C++ | mit | lanurmi/sailfactor,lanurmi/sailfactor |
0f2c181d0feeff3b9fb4f61c9132f18c7fa42930 | source/Utility/LLDBAssert.cpp | source/Utility/LLDBAssert.cpp | //===--------------------- LLDBAssert.cpp ------------------------*- C++-*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... | //===--------------------- LLDBAssert.cpp ------------------------*- C++-*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... | Terminate debugger if an assert was hit | Terminate debugger if an assert was hit
Reviewers: JDevlieghere, teemperor, #lldb
Reviewed By: JDevlieghere
Subscribers: clayborg, lemo, lldb-commits
Differential Revision: https://reviews.llvm.org/D51604
git-svn-id: 4c4cc70b1ef44ba2b7963015e681894188cea27e@341387 91177308-0d34-0410-b5e6-96231b3b80d8
| C++ | apache-2.0 | apple/swift-lldb,apple/swift-lldb,llvm-mirror/lldb,apple/swift-lldb,apple/swift-lldb,llvm-mirror/lldb,llvm-mirror/lldb,llvm-mirror/lldb,llvm-mirror/lldb,apple/swift-lldb,apple/swift-lldb |
4945f164e58cbc6952225289add67b9632669ddb | source/tools/cgwhite/main.cpp | source/tools/cgwhite/main.cpp |
#if defined(WIN32) && !defined(_DEBUG)
#pragma comment(linker, "/SUBSYSTEM:WINDOWS /entry:mainCRTStartup")
#endif
#include "Application.h"
#include <memory>
#include <gloperate-qtapplication/Viewer.h>
int main(int argc, char * argv[])
{
Application app(argc, argv);
std::unique_ptr<gloperate_qtapplicatio... |
#if defined(WIN32) && !defined(_DEBUG)
#pragma comment(linker, "/SUBSYSTEM:WINDOWS /entry:mainCRTStartup")
#endif
#include "Application.h"
#include <memory>
#include <gloperate-qtapplication/Viewer.h>
#include <widgetzeug/dark_fusion_style.hpp>
int main(int argc, char * argv[])
{
Application app(argc, argv)... | Use dark theme in cgwhite | Use dark theme in cgwhite
| C++ | mit | j-o/gloperate,p-otto/gloperate,lanice/gloperate,cginternals/gloperate,p-otto/gloperate,lanice/gloperate,j-o/gloperate,hpicgs/gloperate,p-otto/gloperate,lanice/gloperate,p-otto/gloperate,hpicgs/gloperate,j-o/gloperate,cginternals/gloperate,cginternals/gloperate,j-o/gloperate,Beta-Alf/gloperate,hpicgs/gloperate,Beta-Alf/... |
de67ed19b30576db29abc461a1141dc3e2e6bc90 | testing/testCetTestSIP/set_ldpath.cc | testing/testCetTestSIP/set_ldpath.cc | #include <cstdlib>
#include <string.h>
#include <iostream>
int main() {
#ifdef __APPLE__
const char* name = "DYLD_LIBRARY_PATH";
#else
const char* name = "LD_LIBRARY_PATH";
#endif
const char* cetLDPathValue = getenv("CETD_LIBRARY_PATH");
int res = setenv("DYLD_LIBRARY_PATH", cetLDPathValue, 1);
const char*... | #include <cstdlib>
#include <string.h>
#include <iostream>
int main() {
#ifdef __APPLE__
const char* name = "DYLD_LIBRARY_PATH";
#else
const char* name = "LD_LIBRARY_PATH";
#endif
const char* cetLDPathValue = getenv("CETD_LIBRARY_PATH");
int res = setenv(name, cetLDPathValue, 1);
if (res != 0) {
std::c... | Fix errors reported by Travis on Linux | Fix errors reported by Travis on Linux
- Use return value from setenv
- Use name variable for platform dependent dynamic path
| C++ | bsd-3-clause | drbenmorgan/cetbuildtools2,drbenmorgan/cetbuildtools2,drbenmorgan/cetbuildtools2 |
7f64063ffb5c77911c01ae8cbbbf88916bfb06f1 | build/tizen/adaptor/linker-test.cpp | build/tizen/adaptor/linker-test.cpp | /*
* Copyright (c) 2014 Samsung Electronics Co., Ltd.
*
* 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... | /*
* Copyright (c) 2014 Samsung Electronics Co., Ltd.
*
* 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... | Fix prevent issue - uncaught exception | Fix prevent issue - uncaught exception
In function main(int, char **) an exception of type Dali::DaliException is thrown and never caught.
MainLoop() may throw an exception.
Change-Id: Iaa61013fd07a287e360fb37d0a3548c7ea33343c
| C++ | apache-2.0 | dalihub/dali-adaptor,dalihub/dali-adaptor,dalihub/dali-adaptor,dalihub/dali-adaptor,dalihub/dali-adaptor |
26879320898aacfcb5236c725938e259788c10fc | src/caffe/test/test_caffe_main.cpp | src/caffe/test/test_caffe_main.cpp | // The main caffe test code. Your test cpp code should include this hpp
// to allow a main function to be compiled into the binary.
#include "caffe/caffe.hpp"
#include "caffe/test/test_caffe_main.hpp"
namespace caffe {
#ifndef CPU_ONLY
cudaDeviceProp CAFFE_TEST_CUDA_PROP;
#endif
}
#ifndef CPU_ONLY
using caffe::CAF... | #include "caffe/caffe.hpp"
#include "caffe/test/test_caffe_main.hpp"
namespace caffe {
#ifndef CPU_ONLY
cudaDeviceProp CAFFE_TEST_CUDA_PROP;
#endif
}
#ifndef CPU_ONLY
using caffe::CAFFE_TEST_CUDA_PROP;
#endif
int main(int argc, char** argv) {
::testing::InitGoogleTest(&argc, argv);
caffe::GlobalInit(&argc, &ar... | Remove misleading comment from a test file | Remove misleading comment from a test file
| C++ | agpl-3.0 | CZCV/s-dilation-caffe,gnina/gnina,CZCV/s-dilation-caffe,gnina/gnina,tackgeun/caffe,gnina/gnina,CZCV/s-dilation-caffe,tackgeun/caffe,gnina/gnina,gnina/gnina,CZCV/s-dilation-caffe,tackgeun/caffe,gnina/gnina,tackgeun/caffe |
5e7a97fb797c89a3ae6276d1394f95619a7151fb | 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 | yitian134/chromium,ropik/chromium,ropik/chromium,Crystalnix/house-of-life-chromium,gavinp/chromium,ropik/chromium,adobe/chromium,gavinp/chromium,gavinp/chromium,Crystalnix/house-of-life-chromium,gavinp/chromium,adobe/chromium,Crystalnix/house-of-life-chromium,yitian134/chromium,gavinp/chromium,yitian134/chromium,adobe/... |
bdff2f227c15981ac29b80aaa2652605e9b67134 | src/node.cpp | src/node.cpp | #include "dafs/node.hpp"
namespace dafs
{
Node::Node()
: slot_minus(dafs::Root("p-minus")),
slot_zero(dafs::Root("p-zero")),
slot_plus(dafs::Root("p-plus"))
{
}
dafs::Partition&
Node::GetPartition(Slot slot)
{
switch (slot)
{
case Slot::... | #include "dafs/node.hpp"
namespace dafs
{
Node::Node()
: slot_minus(dafs::Root("p-minus")),
slot_zero(dafs::Root("p-zero")),
slot_plus(dafs::Root("p-plus"))
{
}
dafs::Partition&
Node::GetPartition(Slot slot)
{
switch (slot)
{
case Slot::... | Implement identity to partition association | Implement identity to partition association
| C++ | mit | dgkimura/dafs,dgkimura/dafs |
5d18d597cf991b113f2ad6bf72c59bcc2d1ae67a | src/14.cpp | src/14.cpp | #include <iostream>
static constexpr unsigned getSequenceLength(unsigned number) noexcept
{
unsigned length = 0;
while (number != 1) {
if ((number & 1) == 0) {
number >>= 1;
} else {
number = 3 * number + 1;
... | #include <iostream>
static constexpr unsigned getSequenceLength(unsigned number) noexcept
{
unsigned length = 0;
while (number != 1) {
if ((number & 1) == 0) {
number >>= 1;
} else {
number = 3 * number + 1;
... | Switch to better variable name | Switch to better variable name
| C++ | unlicense | gokselgoktas/project-euler |
3c03d30a0969afb14da21fc15b96fa04c9263b19 | Sources/Rosetta/Conditions/SelfCondition.cpp | Sources/Rosetta/Conditions/SelfCondition.cpp | // This code is based on Sabberstone project.
// Copyright (c) 2017-2019 SabberStone Team, darkfriend77 & rnilva
// RosettaStone is hearthstone simulator using C++ with reinforcement learning.
// Copyright (c) 2019 Chris Ohk, Youngjoong Kim, SeungHyun Jeon
#include <Rosetta/Conditions/SelfCondition.hpp>
#include <Rose... | // This code is based on Sabberstone project.
// Copyright (c) 2017-2019 SabberStone Team, darkfriend77 & rnilva
// RosettaStone is hearthstone simulator using C++ with reinforcement learning.
// Copyright (c) 2019 Chris Ohk, Youngjoong Kim, SeungHyun Jeon
#include <Rosetta/Conditions/SelfCondition.hpp>
#include <Rose... | Correct invalid capture (reference -> value) | fix: Correct invalid capture (reference -> value)
| C++ | mit | Hearthstonepp/Hearthstonepp,Hearthstonepp/Hearthstonepp |
4f44ce489f18512b90a474e3743fd5b90b5a9c69 | src/stdio.cpp | src/stdio.cpp | // Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
#include <stdio.h>
#include "Arduino.h"
extern "C" {
size_t _write(int handle, const unsigned char *buf, size_t bufSize)
{
/* Check for the command to... | // Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
#include <stdio.h>
#include "Arduino.h"
asm(".global _printf_float");
asm(".global _scanf_float");
extern "C" {
size_t _write(int handle, const unsigned char *bu... | Add reference to _printf_float and _scanf_float so they are linked by linker | Add reference to _printf_float and _scanf_float so they are linked by linker
| C++ | mit | stefangordon/AzureIoT,obsoleted/AzureIoT,arduino-libraries/AzureIoT,sandeepmistry/AzureIoT,stefangordon/AzureIoT,obsoleted/AzureIoT,arduino-libraries/AzureIoT,arduino-libraries/AzureIoT,sandeepmistry/AzureIoT |
f7550e46ef84d35f05abb94c993d52b75af0a51c | 2DXngine.Test/src/Integration_Tiled/ParseMapTest.cc | 2DXngine.Test/src/Integration_Tiled/ParseMapTest.cc | #include "gtest\gtest.h"
#include "TiledFixture.h"
TEST_F(TiledFixture, map_attributes_should_be_parsed)
{
ASSERT_EQ("1.0", _parsedMap->get_version());
ASSERT_EQ("1.0.3", _parsedMap->get_tiledVersion());
ASSERT_EQ(Orientation::ORTOGNAL, _parsedMap->get_orientation());
ASSERT_EQ(RenderOrder::RIGHT_DOWN... | #include "gtest\gtest.h"
#include "TiledFixture.h"
TEST_F(TiledFixture, map_attributes_should_be_parsed)
{
ASSERT_EQ("1.0", _parsedMap->get_version());
ASSERT_EQ("1.0.3", _parsedMap->get_tiledVersion());
ASSERT_EQ(Orientation::ORTOGNAL, _parsedMap->get_orientation());
ASSERT_EQ(RenderOrder::RIGHT_DOWN... | Test for map that check objectgroup | ADD: Test for map that check objectgroup
| C++ | mit | Harunx9/2DXngine,Harunx9/2DXngine,Harunx9/2DXngine |
ae54d73270d0e6dbaca01fcbb374f79737c6c1bd | Settings/Tabs/About.cpp | Settings/Tabs/About.cpp | #include "About.h"
#include "../resource.h"
#include "../Updater/Updater.h"
#include "../Updater/Version.h"
void About::Initialize() {
INIT_CONTROL(LBL_TITLE, Label, _title);
std::wstring version = Updater::MainAppVersionString();
_title.Text(L"3RVX " + version);
}
void About::LoadSettings() {
}
void ... | #include "About.h"
#include "../resource.h"
#include "../Updater/Updater.h"
#include "../Updater/Version.h"
void About::Initialize() {
INIT_CONTROL(LBL_TITLE, Label, _title);
std::wstring version = Updater::MainAppVersion().ToString();
_title.Text(L"3RVX " + version);
}
void About::LoadSettings() {
}
... | Use new version ToString method | Use new version ToString method
| C++ | bsd-2-clause | malensek/3RVX,malensek/3RVX,malensek/3RVX |
e8499cb8cbf007b083d68512ebb74fd3ab6fff56 | ouzel/core/linux/main.cpp | ouzel/core/linux/main.cpp | // Copyright (C) 2017 Elviss Strazdins
// This file is part of the Ouzel engine.
#include "ApplicationLinux.h"
int main(int argc, char* argv[])
{
ouzel::ApplicationLinux application(argc, argv);
return application.run();
}
| // Copyright (C) 2017 Elviss Strazdins
// This file is part of the Ouzel engine.
#include "EngineLinux.h"
int main(int argc, char* argv[])
{
ouzel::EngineLinux engine(argc, argv);
return engine.run();
}
| Fix engine initialization on Linux | Fix engine initialization on Linux
| C++ | unlicense | Hotspotmar/ouzel,elnormous/ouzel,Hotspotmar/ouzel,Hotspotmar/ouzel,elnormous/ouzel,elnormous/ouzel,elvman/ouzel,elvman/ouzel |
e89fbbff86c4350f026e48eb10751d29a84bdc14 | dbus/dbus_manager_tizen.cc | dbus/dbus_manager_tizen.cc | // Copyright (c) 2013 Intel Corporation. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "xwalk/dbus/dbus_manager.h"
#include <glib.h>
#include <string>
#include "base/bind.h"
#include "base/strings/stringprintf.h"
#include "base/th... | // Copyright (c) 2013 Intel Corporation. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "xwalk/dbus/dbus_manager.h"
#include <glib.h>
#include <string>
#include "base/bind.h"
#include "base/strings/stringprintf.h"
#include "base/th... | Fix session bus issue under service mode. | [Tizen][Runtime] Fix session bus issue under service mode.
Tizen 3.x and Tizen 2.x have different DBUS_SESSION_ADDRESS values.
For Tizen 2.x, DBUS_SESSION_ADDRESS points to
'/run/user/$USERNAME/dbus/user_bus_socket',
while for Tizen 3.x, DBUS_SESSION_ADDRESS points to
'/run/user/$UID/dbus/user_bus_socket'.
Since Cros... | C++ | bsd-3-clause | jpike88/crosswalk,lincsoon/crosswalk,dreamsxin/crosswalk,jpike88/crosswalk,PeterWangIntel/crosswalk,weiyirong/crosswalk-1,huningxin/crosswalk,DonnaWuDongxia/crosswalk,Pluto-tv/crosswalk,lincsoon/crosswalk,zliang7/crosswalk,jpike88/crosswalk,mrunalk/crosswalk,amaniak/crosswalk,alex-zhang/crosswalk,hgl888/crosswalk,bestw... |
ad1a2510c3b1286a1c9653e979e17c0b9b2e6971 | Tests/src/main.cpp | Tests/src/main.cpp | #include <cppunit/BriefTestProgressListener.h>
#include <cppunit/CompilerOutputter.h>
#include <cppunit/extensions/TestFactoryRegistry.h>
#include <cppunit/TestResult.h>
#include <cppunit/TestResultCollector.h>
#include <cppunit/TestRunner.h>
#include "Suite.h"
#if OGRE_PLATFORM == OGRE_PLATFORM_WIN32
#define WIN32_... | #include <cppunit/BriefTestProgressListener.h>
#include <cppunit/CompilerOutputter.h>
#include <cppunit/extensions/TestFactoryRegistry.h>
#include <cppunit/TestResult.h>
#include <cppunit/TestResultCollector.h>
#include <cppunit/TestRunner.h>
#include "Suite.h"
#if OGRE_PLATFORM == OGRE_PLATFORM_WIN32
#define WIN32_... | Write test results to a file for easier examination | Write test results to a file for easier examination
--HG--
extra : convert_revision : svn%3A8631bf8a-c64b-0410-883c-f3eb003322f7/trunk%40570
| C++ | mit | nezticle/ogre,nezticle/ogre,jhu-lcsr-forks/ogre,bhlzlx/ogre,jhu-lcsr-forks/ogre,ehsan/ogre,ehsan/ogre,largerussiangames/ogre,largerussiangames/ogre,bhlzlx/ogre,ehsan/ogre,bhlzlx/ogre,nezticle/ogre,largerussiangames/ogre,ruleless/ogre,ruleless/ogre,vancepym/ogre,ruleless/ogre,vancepym/ogre,ruleless/ogre,ruleless/ogre,bh... |
6e6d7b41dedd5de7191f5e63773d6be14c567e37 | webkit/port/plugins/chromium/PluginDataChromium.cpp | webkit/port/plugins/chromium/PluginDataChromium.cpp | // Copyright (c) 2008 The Chromium Authors. All rights reserved. Use of this
// source code is governed by a BSD-style license that can be found in the
// LICENSE file.
#include "config.h"
#include "PluginData.h"
#include "PluginInfoStore.h"
#undef LOG
#include "webkit/glue/glue_util.h"
#include "webkit/glue/webkit... | // Copyright (c) 2008, Google Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of condi... | Fix plugin data refreshing to work again. | Fix plugin data refreshing to work again.
R=ojan
Review URL: http://codereview.chromium.org/9767
git-svn-id: http://src.chromium.org/svn/trunk/src@5216 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Former-commit-id: 4c0c598fbab45f3990c86de4f79b5cd504acf1e8 | 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... |
1a6c43a9d215697dbe0418c145a6bd1c85ec654d | test/CXX/expr/expr.post/expr.call/p7-0x.cpp | test/CXX/expr/expr.post/expr.call/p7-0x.cpp | // RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s
struct X1 {
X1();
};
struct X2 {
X2();
~X2();
};
void vararg(...);
void f(X1 x1, X2 x2) {
vararg(x1); // okay
vararg(x2); // expected-error{{cannot pass object of non-trivial type 'X2' through variadic function; call will abort at runtime}}
}
namesp... | // RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s
struct X1 {
X1();
};
struct X2 {
X2();
~X2();
};
struct X3 {
X3(const X3&) = default;
};
struct X4 {
X4(const X4&) = default;
X4(X4&);
};
void vararg(...);
void f(X1 x1, X2 x2, X3 x3, X4 x4) {
vararg(x1); // OK
vararg(x2); // expected-error{{c... | Test that we correctly deal with multiple copy constructors when detecting non-trivial special members for varargs calls. | Test that we correctly deal with multiple copy constructors when detecting
non-trivial special members for varargs calls.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@168476 91177308-0d34-0410-b5e6-96231b3b80d8
| C++ | apache-2.0 | apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-cl... |
8095925003400f65381e6bc2bae09a30b273be72 | src/Unix/FileSystem/Operations/ExecutableLauncherUnix.cpp | src/Unix/FileSystem/Operations/ExecutableLauncherUnix.cpp | #include "ExecutableLauncherUnix.h"
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <unistd.h>
#include <sys/wait.h>
#include <cstdlib>
using namespace clt::filesystem::operations;
void ExecutableLauncherUnix::execute(const entities::Path & path)
{
pid_t cpid;
cpid = fork();
switch (cpid... | #include "ExecutableLauncherUnix.h"
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <unistd.h>
#include <sys/wait.h>
#include <cstdlib>
using namespace clt::filesystem::operations;
void ExecutableLauncherUnix::execute(const entities::Path & path)
{
pid_t cpid;
cpid = fork();
switch (cpid... | Add first parameter when launching executable for unix | Add first parameter when launching executable for unix
| C++ | mit | aphilippe/ClappLauncher,aphilippe/ClappLauncher,aphilippe/AppLauncher,aphilippe/AppLauncher,aphilippe/ClappLauncher,aphilippe/AppLauncher |
48ec25d3b842f0abf266565d06b0345cb50c8958 | excercise04/sort/heapsort.cpp | excercise04/sort/heapsort.cpp | #include "heapsort.hpp"
#include "heap.hpp"
#include "swap.hpp"
void heapsort(int *data, const int size_of_data)
{
binary_max_heap(data, size_of_data - 1);
do_heapsort(data, size_of_data - 1);
}
void do_heapsort(int *data, const int end)
{
if(end <= 0) return;
int k = 0;
swap(data[k], data[end])... | #include "heapsort.hpp"
#include "heap.hpp"
#include "swap.hpp"
void heapsort(int *data, const int size_of_data)
{
convert_to_binary_max_heap(data, size_of_data);
do_heapsort(data, size_of_data - 1);
}
void do_heapsort(int *data, const int end)
{
if(end <= 0) return;
int k = 0;
swap(data[k], data... | Fix the not matching function declaration | Fix the not matching function declaration
* This commit due to commit a8da5935adc8054bf1f1eefc1e61395f336f40ff
| C++ | mit | kdzlvaids/algorithm_and_practice-pknu-2016,kdzlvaids/algorithm_and_practice-pknu-2016 |
3b327df6b66435e56305f12b32cdb5acb3fd1d90 | src/test/test_bitcoin.cpp | src/test/test_bitcoin.cpp | #define BOOST_TEST_MODULE Bitcoin Test Suite
#include <boost/test/unit_test.hpp>
#include "db.h"
#include "txdb.h"
#include "main.h"
#include "wallet.h"
CWallet* pwalletMain;
CClientUIInterface uiInterface;
extern bool fPrintToConsole;
extern void noui_connect();
struct TestingSetup {
CCoinsViewDB *pcoinsdbview... | #define BOOST_TEST_MODULE Bitcoin Test Suite
#include <boost/test/unit_test.hpp>
#include "db.h"
#include "txdb.h"
#include "main.h"
#include "wallet.h"
CWallet* pwalletMain;
CClientUIInterface uiInterface;
extern bool fPrintToConsole;
extern void noui_connect();
struct TestingSetup {
CCoinsViewDB *pcoinsdbview... | Fix tests after cache tweaks | Fix tests after cache tweaks
| C++ | mit | ahmedbodi/poscoin,reddink/reddcoin,joroob/reddcoin,reddcoin-project/reddcoin,ahmedbodi/poscoin,reddink/reddcoin,bmp02050/ReddcoinUpdates,reddink/reddcoin,coinkeeper/2015-06-22_19-10_cannacoin,coinkeeper/2015-06-22_19-10_cannacoin,Cannacoin-Project/Cannacoin,reddcoin-project/reddcoin,joroob/reddcoin,reddink/reddcoin,coi... |
e7da59c6c0b425281a9e9d0161cee70e4633ea72 | src/mock/unittest_utils.cc | src/mock/unittest_utils.cc | #include "mock/unittest_utils.hpp"
#include <stdlib.h>
#include "errors.hpp"
#include <boost/bind.hpp>
#include "arch/timing.hpp"
#include "arch/runtime/starter.hpp"
#include "utils.hpp" // randint
namespace mock {
temp_file_t::temp_file_t(const char *tmpl) {
size_t len = strlen(tmpl);
filename.... | #include "mock/unittest_utils.hpp"
#include <stdlib.h>
#include "errors.hpp"
#include <boost/bind.hpp>
#include "arch/timing.hpp"
#include "arch/runtime/starter.hpp"
#include "utils.hpp" // randint
namespace mock {
temp_file_t::temp_file_t(const char *tmpl) {
size_t len = strlen(tmpl);
filename.... | Make let_stuff_happen() wait longer under valgrind. | Make let_stuff_happen() wait longer under valgrind.
| C++ | agpl-3.0 | eliangidoni/rethinkdb,eliangidoni/rethinkdb,mcanthony/rethinkdb,niieani/rethinkdb,bchavez/rethinkdb,mcanthony/rethinkdb,sbusso/rethinkdb,AntouanK/rethinkdb,eliangidoni/rethinkdb,Qinusty/rethinkdb,JackieXie168/rethinkdb,AntouanK/rethinkdb,dparnell/rethinkdb,bchavez/rethinkdb,matthaywardwebdesign/rethinkdb,losywee/rethin... |
9c5dac3f128020d71fd774be8b22af74bc19b534 | test_package/example.cpp | test_package/example.cpp | #include "lua.h"
extern "C"
#if defined(_MSC_VER) || defined(__BORLANDC__) || defined(__CODEGEARC__)
__declspec(dllimport)
#endif
int luaopen_luapbintf(lua_State* L);
int main() {
void * p = static_cast<void*>(luaopen_luapbintf);
return 0;
}
| #include "lua.h"
extern "C"
#if defined(_MSC_VER) || defined(__BORLANDC__) || defined(__CODEGEARC__)
__declspec(dllimport)
#endif
int luaopen_luapbintf(lua_State* L);
int main() {
int (*pFun)(lua_State*);
pFun = luaopen_luapbintf;
return 0;
}
| Fix error: invalid static_cast from type ‘int(lua_State*)’ to type ‘void*’ | Fix error: invalid static_cast from type ‘int(lua_State*)’ to type ‘void*’
| C++ | mit | jinq0123/LuaPbIntf,jinq0123/LuaPbIntf,jinq0123/LuaPbIntf |
916b2ee8a2b071c0726d25542422a03fabbb1e19 | tensorflow/compiler/mlir/quantization/tensorflow/utils/quant_spec.cc | tensorflow/compiler/mlir/quantization/tensorflow/utils/quant_spec.cc | /* Copyright 2022 The TensorFlow Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or a... | /* Copyright 2022 The TensorFlow Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or a... | Add ConcatV2 to the list of same scale ops | Add ConcatV2 to the list of same scale ops
PiperOrigin-RevId: 436378646
| C++ | apache-2.0 | tensorflow/tensorflow-experimental_link_static_libraries_once,gautam1858/tensorflow,gautam1858/tensorflow,yongtang/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,paolodedios/tensorflow,karllessard/tensorflow,tensorflow/tensorflow-pywrap_saved_model,paolodedios/tensorflow,yongtang/tensorflow,te... |
b21edeb90f8d7d91d5d498b09d6ce6feef98b10e | source/scriptzeug/source/ScriptContext.cpp | source/scriptzeug/source/ScriptContext.cpp | #include <scriptzeug/ScriptContext.h>
#include <scriptzeug/Backend/AbstractScriptContext.h>
#include "BackendDuktape/DuktapeScriptContext.h"
#ifdef LIBZEUG_USE_V8
#include "BackendJavaScript/JSScriptContext.h"
#endif
using namespace reflectionzeug;
namespace scriptzeug
{
ScriptContext::ScriptContext(const std::... | #include <scriptzeug/ScriptContext.h>
#include <scriptzeug/Backend/AbstractScriptContext.h>
#include "BackendDuktape/DuktapeScriptContext.h"
#ifdef LIBZEUG_USE_V8
#include "BackendJavaScript/JSScriptContext.h"
#endif
using namespace reflectionzeug;
namespace scriptzeug
{
ScriptContext::ScriptContext(const std::... | Make "duktape" the default javascript backend | Make "duktape" the default javascript backend
| C++ | mit | j-o/libzeug,cginternals/libzeug,cginternals/libzeug,p-otto/libzeug,simonkrogmann/libzeug,p-otto/libzeug,j-o/libzeug,mjendruk/libzeug,cginternals/libzeug,lanice/libzeug,p-otto/libzeug,kateyy/libzeug,lanice/libzeug,cginternals/libzeug,j-o/libzeug,kateyy/libzeug,lanice/libzeug,simonkrogmann/libzeug,hpi-r2d2/libzeug,mjendr... |
e7e43fb9928d7d5a6be342393aa057e9b094ac1b | src/common/debug.cpp | src/common/debug.cpp | //
// Copyright (c) 2002-2010 The ANGLE 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.
//
// debug.cpp: Debugging utilities.
#include "common/debug.h"
#include <stdio.h>
#include <stdarg.h>
namespace gl
{
void trace(const... | //
// Copyright (c) 2002-2010 The ANGLE 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.
//
// debug.cpp: Debugging utilities.
#include "common/debug.h"
#include <stdio.h>
#include <stdarg.h>
static bool trace_on = true;
n... | Make it easier to disable tracing | Make it easier to disable tracing
TRAC #11979
Signed-off-by: Shannon Woods
Signed-off-by: Daniel Koch
Author: Andrew Lewycky
git-svn-id: a070b70d2b8c44c266a3870c0cddd9a0ee470458@178 736b8ea6-26fd-11df-bfd4-992fa37f6226
| C++ | bsd-3-clause | larsbergstrom/angle,mybios/angle,crezefire/angle,android-ia/platform_external_chromium_org_third_party_angle_dx11,android-ia/platform_external_chromium_org_third_party_angle_dx11,nandhanurrevanth/angle,themusicgod1/angleproject,cantren/angleproject,pombreda/angleproject,mybios/angle,ghostoy/angle,crezefire/angle,Republ... |
1e41336415ceea828ac14c30f2e4d9bd445e77bd | test/CodeGenCXX/multi-dim-operator-new.cpp | test/CodeGenCXX/multi-dim-operator-new.cpp | // RUN: %clang_cc1 -emit-llvm-only -verify %s
// PR6641
extern "C" int printf(const char *, ...);
struct Foo {
Foo() : iFoo (2) {
printf("%p\n", this);
}
int iFoo;
};
typedef Foo (*T)[3][4];
T bar() {
return new Foo[2][3][4];
}
T bug(int i) {
return new Foo[i][3][4];
}
void pr(T a) {
for (int i = 0; i ... | // RUN: %clang_cc1 %s -triple x86_64-unknown-unknown -emit-llvm -o - | FileCheck %s
// PR6641
extern "C" int printf(const char *, ...);
struct Foo {
Foo() : iFoo (2) {
printf("%p\n", this);
}
int iFoo;
};
typedef Foo (*T)[3][4];
T bar() {
return new Foo[2][3][4];
}
T bug(int i) {
return new Foo[i][3][4];
... | Check for some code gen. for PR6641 test. | Check for some code gen. for PR6641 test.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@99526 91177308-0d34-0410-b5e6-96231b3b80d8
| C++ | apache-2.0 | llvm-mirror/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,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-cl... |
0593e64c0271679146aadf079a33f98e3bb1be3f | src/index/DocsDB.cpp | src/index/DocsDB.cpp | // Copyright 2015, University of Freiburg,
// Chair of Algorithms and Data Structures.
// Author: Björn Buchhold (buchhold@informatik.uni-freiburg.de)
#include <algorithm>
#include "DocsDB.h"
#include "../global/Constants.h"
// _____________________________________________________________________________
void DocsDB:... | // Copyright 2015, University of Freiburg,
// Chair of Algorithms and Data Structures.
// Author: Björn Buchhold (buchhold@informatik.uni-freiburg.de)
#include <algorithm>
#include "DocsDB.h"
#include "../global/Constants.h"
// _____________________________________________________________________________
void DocsDB:... | Add TODO for C++17 non-const data() | Add TODO for C++17 non-const data() | C++ | apache-2.0 | Buchhold/QLever,Buchhold/QLever,Buchhold/QLever,Buchhold/QLever,Buchhold/QLever |
b5936954f6817733c0b9bd9c4121851a539fc200 | webkit/extensions/v8/playback_extension.cc | webkit/extensions/v8/playback_extension.cc | // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "config.h"
#include "webkit/extensions/v8/playback_extension.h"
namespace extensions_v8 {
const char* kPlaybackExtensionName = "v8/Pla... | // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "config.h"
#include "webkit/extensions/v8/playback_extension.h"
namespace extensions_v8 {
const char* kPlaybackExtensionName = "v8/Pla... | Update playback extension so that javascript functions return consistent (but not constant) values in an attempt to preserve the functionality but improve compatibility of the extension. | Update playback extension so that javascript functions return consistent (but not constant) values in an attempt to preserve the functionality but improve compatibility of the extension.
Review URL: http://codereview.chromium.org/62165
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@13688 0039d316-1c4b-4281-b951... | C++ | bsd-3-clause | jaruba/chromium.src,mogoweb/chromium-crosswalk,Just-D/chromium-1,dushu1203/chromium.src,mohamed--abdel-maksoud/chromium.src,anirudhSK/chromium,rogerwang/chromium,dednal/chromium.src,Just-D/chromium-1,mogoweb/chromium-crosswalk,fujunwei/chromium-crosswalk,markYoungH/chromium.src,keishi/chromium,robclark/chromium,PeterWa... |
83a7ffd214f572add11b6aac85265ace1e435f19 | tests/testValues.cpp | tests/testValues.cpp | #include "gtest/gtest.h"
TEST(TestValues, Length)
{
ASSERT_TRUE(false);
}
| #include "gtest/gtest.h"
TEST(TestValues, Length)
{
ASSERT_TRUE(false);
Meters myFirstLength();
Meters mySecondLength(1.53);
Centimeters myThirdLength(153.0);
// Test equality between mySecondLength and myThirdLength.
}
| Test the ability to compare value types. | Test the ability to compare value types.
| C++ | mit | chrisdembia/disco,chrisdembia/disco |
e56e756a848fecd7c1b7c97339d9ff591a71fd1c | platforms/aerial_v3/platform_config.cpp | platforms/aerial_v3/platform_config.cpp | #include <platform_config.hpp>
#include <hal_config.hpp>
namespace platform {
MPU6000 imu(&SPID1, &mpu6000_spicfg);
DefaultMultirotorVehicleSystem system(&imu, &imu);
void init() {
// Initialize platform HAL
i2cPlatformInit();
pwmPlatformInit();
spiPlatformInit();
usartPlatformInit();
// Initialize pla... | #include <platform_config.hpp>
#include <hal_config.hpp>
namespace platform {
MPU6000 imu(&SPID1, &mpu6000_spicfg);
DefaultMultirotorVehicleSystem system(&imu, &imu);
void init() {
// Initialize platform HAL
i2cPlatformInit();
pwmPlatformInit();
spiPlatformInit();
usartPlatformInit();
// Initialize pla... | Make heartbeat LED pattern for aerial_v3 fancier. | Make heartbeat LED pattern for aerial_v3 fancier.
| C++ | mit | OSURoboticsClub/aerial_control,OSURoboticsClub/aerial_control,OSURoboticsClub/aerial_control |
156b57c09ee252dac30a6af3fd4323da5171a480 | dispar.cpp | dispar.cpp | #include <omp.h>
#include "dispar.h"
#include "tournament.h"
template<typename T>
matrix createRandomTournamentPool(T container,
const size_t nbGroup,
const size_t poolSize) {
std::bitset<1> bs(container.size());
matrix pools(nbGroup);
s... | #include <omp.h>
#include "dispar.h"
#include "tournament.h"
template<typename T>
matrix createRandomTournamentPool(T container,
const size_t nbGroup,
const size_t poolSize) {
std::vector<bool> bs(size);
matrix pools(nbGroup);
size_t car... | Use vector of bool instead of bitset that need to know their size at compile time | Use vector of bool instead of bitset that need to know their size
at compile time
| C++ | mit | pallamidessi/DISPAR |
7439c92343e57d4d78a0c2f751d67fabd9cdd0c9 | bindetection/mediain.cpp | bindetection/mediain.cpp | #include "mediain.hpp"
MediaIn::MediaIn()
{
}
int MediaIn::frameCount(void) const
{
return -1;
}
int MediaIn::frameCounter(void) const
{
return -1;
}
void MediaIn::frameCounter(int frameCount)
{
(void)frameCount;
}
bool MediaIn::getDepthMat(cv::Mat &depthMat)
{
(void)depthMat;
return false;
}
double Medi... | #include "mediain.hpp"
MediaIn::MediaIn()
{
}
int MediaIn::frameCount(void) const
{
return -1;
}
int MediaIn::frameCounter(void) const
{
return -1;
}
void MediaIn::frameCounter(int frameCount)
{
(void)frameCount;
}
bool MediaIn::getDepthMat(cv::Mat &depthMat)
{
depthMat = Mat(); // return empty mat to indicate... | Set returned mat to empty in base getDepthMat | Set returned mat to empty in base getDepthMat
| C++ | mit | FRC900/2016VisionCode,FRC900/2016VisionCode,FRC900/2016VisionCode,FRC900/2016VisionCode,FRC900/2016VisionCode,FRC900/2016VisionCode,FRC900/2016VisionCode |
b76fdf69df5f35c3af9ebe3afc72b0d3c9bf76e7 | test/Analysis/method-call.cpp | test/Analysis/method-call.cpp | // RUN: %clang_cc1 -analyze -analyzer-check-objc-mem -analyzer-inline-call -analyzer-store region -verify %s
struct A {
int x;
A(int a) { x = a; }
int getx() const { return x; }
};
void f1() {
A x(3);
if (x.getx() == 3) {
int *p = 0;
*p = 3; // expected-warning{{Dereference of null pointer}}
} el... | // RUN: %clang_cc1 -analyze -analyzer-check-objc-mem -analyzer-inline-call -analyzer-store region -verify %s
// XFAIL: *
struct A {
int x;
A(int a) { x = a; }
int getx() const { return x; }
};
void f1() {
A x(3);
if (x.getx() == 3) {
int *p = 0;
*p = 3; // expected-warning{{Dereference of null poin... | Disable a test until inlining CXXConstructExprs is fully investigated. | [analyzer] Disable a test until inlining CXXConstructExprs is fully investigated.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@126006 91177308-0d34-0410-b5e6-96231b3b80d8
| C++ | apache-2.0 | apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/cl... |
3113293cd271df80c7df88bbaf092faeeabfd5e9 | src/utils/SkNullCanvas.cpp | src/utils/SkNullCanvas.cpp | /*
* Copyright 2012 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "SkNullCanvas.h"
#include "SkCanvas.h"
#include "SKNWayCanvas.h"
SkCanvas* SkCreateNullCanvas() {
// An N-Way canvas forwards calls to N canvas's. When N == 0 ... | /*
* Copyright 2012 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "SkNullCanvas.h"
#include "SkCanvas.h"
#include "SKNWayCanvas.h"
SkCanvas* SkCreateNullCanvas() {
// An N-Way canvas forwards calls to N canvas's. When N == 0 ... | Fix SkNWayCanvas cons call when creating null canvas. | Fix SkNWayCanvas cons call when creating null canvas.
git-svn-id: e8541e15acce502a64c929015570ad1648e548cd@4223 2bbb7eff-a529-9590-31e7-b0007b416f81
| C++ | bsd-3-clause | mrobinson/skia,Cue/skia,metajack/skia,Cue/skia,metajack/skia,mrobinson/skia,metajack/skia,mrobinson/skia,metajack/skia,mrobinson/skia,mrobinson/skia,Cue/skia,Cue/skia |
c0e262adad5ba818b659b73dfac011ec03193b01 | tests/module/polyfill_test.cc | tests/module/polyfill_test.cc | /* -*- Mode: C++; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */
/*
* Copyright 2016 Couchbase, Inc
*
* 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
*
* h... | /* -*- Mode: C++; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */
/*
* Copyright 2016 Couchbase, Inc
*
* 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
*
* h... | Improve branch coverage of polyfill test | Improve branch coverage of polyfill test
| C++ | apache-2.0 | Chippiewill/phosphor,Chippiewill/phosphor |
6d5e8176ceee77e567b7aa72e9dcab17d93e2cf0 | chrome/browser/extensions/extension_storage_apitest.cc | chrome/browser/extensions/extension_storage_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 "chrome/browser/extensions/extension_apitest.h"
IN_PROC_BROWSER_TEST_F(ExtensionApiTest, Storage) {
ASSERT_TRUE(RunExtensionTest("storage"... | // 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 "chrome/browser/extensions/extension_apitest.h"
#if defined(OS_WIN)
// Always fails on Windows after r110181: http://crbug.com/104419.
#defi... | Mark ExtensionApiTest.Storage as failing, it always fails on Windows after r110181. | Mark ExtensionApiTest.Storage as failing, it always fails on Windows after r110181.
BUG=104419
TEST=none
Review URL: http://codereview.chromium.org/8573032
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@110244 0039d316-1c4b-4281-b951-d872f2087c98
| C++ | bsd-3-clause | zcbenz/cefode-chromium,ChromiumWebApps/chromium,nacl-webkit/chrome_deps,Pluto-tv/chromium-crosswalk,zcbenz/cefode-chromium,Jonekee/chromium.src,ondra-novak/chromium.src,TheTypoMaster/chromium-crosswalk,ondra-novak/chromium.src,patrickm/chromium.src,hujiajie/pa-chromium,jaruba/chromium.src,ChromiumWebApps/chromium,junmi... |
41ca48e478b3a4c19e7b36b6774171cf74f8a527 | elsa/in/k0069.cc | elsa/in/k0069.cc | // friend class as template parameter
// originally found in package 'zipios'
// typechecking results:
// errors: 0
// warnings: 0
// error: k0069.cc:15:12: internal error: found dependent type `Friend' in non-template
// ERR-MATCH: internal error: found dependent type `[^(].*?' in non-template
template< clas... | // friend class as template parameter
// originally found in package 'zipios'
// typechecking results:
// errors: 0
// warnings: 0
// error: k0069.cc:15:12: internal error: found dependent type `Friend' in non-template
// ERR-MATCH: internal error: found dependent type `.*?' in non-template
template< class Ty... | Undo previous - hard to distinguish errors | Undo previous - hard to distinguish errors
| C++ | bsd-3-clause | angavrilov/olmar,angavrilov/olmar,angavrilov/olmar,angavrilov/olmar |
1458247e8425a3d7f2c075adabb6749ab866b3e5 | src/o2gft.cpp | src/o2gft.cpp | #include "o2gft.h"
#include "o2google.h"
static const char *GftScope = "https://www.googleapis.com/auth/fusiontables";
static const char *GftEndpoint = "https://accounts.google.com/o/oauth2/auth";
static const char *GftTokenUrl = "https://accounts.google.com/o/oauth2/token";
static const char *GftRefreshUrl = "https:/... | #include "o2gft.h"
#include "o2google.h"
static const char *GftScope = "https://www.googleapis.com/auth/fusiontables";
O2Gft::O2Gft(QObject *parent): O2Google(parent) {
setScope(GftScope);
}
| Remove unused constants causing warnings | Remove unused constants causing warnings
| C++ | bsd-2-clause | Timac/o2,pipacs/o2,Timac/o2,pipacs/o2 |
9f47066cb84e30b49ffbcaf2706d40bc6473288e | src/mutex.cpp | src/mutex.cpp | /*************************************************
* Mutex Source File *
* (C) 1999-2006 The Botan Project *
*************************************************/
#include <botan/mutex.h>
namespace Botan {
/*************************************************
* Mutex_Holder Cons... | /*************************************************
* Mutex Source File *
* (C) 1999-2006 The Botan Project *
*************************************************/
#include <botan/mutex.h>
namespace Botan {
/*************************************************
* Mutex_Holder Cons... | Fix the constructor of Mutex_State_Error | Fix the constructor of Mutex_State_Error
| C++ | bsd-2-clause | randombit/botan,randombit/botan,randombit/botan,Rohde-Schwarz-Cybersecurity/botan,Rohde-Schwarz-Cybersecurity/botan,webmaster128/botan,webmaster128/botan,webmaster128/botan,Rohde-Schwarz-Cybersecurity/botan,webmaster128/botan,randombit/botan,Rohde-Schwarz-Cybersecurity/botan,randombit/botan,Rohde-Schwarz-Cybersecurity/... |
1c44fa3b8495ee5bed88808526b8242e93966d69 | src/Config.cpp | src/Config.cpp |
#include "Config.hpp"
#include <fstream>
#ifndef INSTALL_PREFIX
#error CMake has not defined INSTALL_PREFIX!
#endif
Json::Value Config::getQuorumNode()
{
return loadFile(INSTALL_PREFIX + "/lib/tor-onions/quorum.json");
}
Json::Value Config::getMirror()
{
return loadFile(INSTALL_PREFIX + "/lib/tor-onions/mir... |
#include "Config.hpp"
#include "Log.hpp"
#include <fstream>
#ifndef INSTALL_PREFIX
#error CMake has not defined INSTALL_PREFIX!
#endif
Json::Value Config::getQuorumNode()
{
return loadFile(INSTALL_PREFIX + "/lib/tor-onions/quorum.json");
}
Json::Value Config::getMirror()
{
return loadFile(INSTALL_PREFIX + "... | Handle inability to open a resource | Handle inability to open a resource
| C++ | bsd-3-clause | Jesse-V/OnioNS-common,Jesse-V/OnioNS-common,Jesse-V/OnioNS-common |
18303dd3b3f89874a225aabedb26df5f5b5fa237 | tests/main.cpp | tests/main.cpp | #include <iostream>
#include <gtest/gtest.h>
#include <GLFW/glfw3.h>
static void error_callback(int error, const char* description)
{
FAIL() << "GLFW Failed (" << error << "): " << description;
}
TEST(GLFWTests, BuildInvisibleWindow)
{
GLFWwindow* window;
glfwSetErrorCallback(error_callback);
if (!glfwInit()... | #include <iostream>
#include <gtest/gtest.h>
#include <GLFW/glfw3.h>
static void error_callback(int error, const char* description)
{
FAIL() << "GLFW Failed (" << error << "): " << description;
}
TEST(GLFWTests, BuildInvisibleWindow)
{
GLFWwindow* window;
glfwSetErrorCallback(error_callback);
if (!glfwInit()... | Remove window display. There is no X server on travis. | Remove window display. There is no X server on travis.
| C++ | mit | iauns/cpm-glfw,iauns/cpm-glfw |
b4e5d53b6928db2c9e5fd89cdf4190aa131f1c29 | src/components/Trace.cpp | src/components/Trace.cpp | #include <sstream>
#include <boost/format.hpp>
#include "Colors.h"
#include "Trace.h"
Trace::Trace()
{
}
Trace::~Trace()
{
}
/* Add an instruction in the trace */
void Trace::addInstruction(Inst *instruction)
{
this->instructions.push_back(instruction);
}
/* Returns the instructions list in the trace */
std... | #include <sstream>
#include <boost/format.hpp>
#include "Colors.h"
#include "Trace.h"
Trace::Trace()
{
}
Trace::~Trace()
{
}
/* Add an instruction in the trace */
void Trace::addInstruction(Inst *instruction)
{
this->instructions.push_back(instruction);
}
/* Returns the instructions list in the trace */
std... | Add the threadID viewing in the output | Add the threadID viewing in the output
| C++ | apache-2.0 | JonathanSalwan/Triton,JonathanSalwan/Triton,JonathanSalwan/Triton,JonathanSalwan/Triton,JonathanSalwan/Triton |
2fff0c2cac383d707c9e91b5394393990b1ca8a7 | test/main.cpp | test/main.cpp | #include <exception>
//#if (__GLIBCXX__ / 10000) == 2014
namespace std {
inline bool uncaught_exception() noexcept(true)
{ return current_exception() != nullptr; }
} // namespace std
//#endif
#define CATCH_CONFIG_MAIN
#include <catch.hpp>
| #define CATCH_CONFIG_MAIN
#include <catch.hpp>
| Remove GCC fix that is not needed | Remove GCC fix that is not needed
| C++ | bsd-2-clause | whoshuu/rapidcheck,whoshuu/rapidcheck,emil-e/rapidcheck,tm604/rapidcheck,emil-e/rapidcheck,tm604/rapidcheck,emil-e/rapidcheck,unapiedra/rapidfuzz,unapiedra/rapidfuzz,whoshuu/rapidcheck,tm604/rapidcheck,unapiedra/rapidfuzz |
94e8644ce9875337e137865777a3c752dbdfdd4c | chrome/common/profile_management_switches.cc | chrome/common/profile_management_switches.cc | // Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/common/profile_management_switches.h"
#include "base/command_line.h"
#include "base/metrics/field_trial.h"
#include "chrome/common/chrom... | // Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/common/profile_management_switches.h"
#include "base/command_line.h"
#include "base/metrics/field_trial.h"
#include "chrome/common/chrom... | Use --new-profile-management to set all related flags. | Use --new-profile-management to set all related flags.
BUG=324046
Review URL: https://codereview.chromium.org/136693007
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@245225 0039d316-1c4b-4281-b951-d872f2087c98
| C++ | bsd-3-clause | anirudhSK/chromium,M4sse/chromium.src,hgl888/chromium-crosswalk,ChromiumWebApps/chromium,TheTypoMaster/chromium-crosswalk,axinging/chromium-crosswalk,Fireblend/chromium-crosswalk,axinging/chromium-crosswalk,hgl888/chromium-crosswalk,Chilledheart/chromium,chuan9/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,dus... |
796b566cd99d34ba7567b252b8bebcf2d63a2566 | Sources/Rosetta/Tasks/SimpleTasks/DamageTask.cpp | Sources/Rosetta/Tasks/SimpleTasks/DamageTask.cpp | // This code is based on Sabberstone project.
// Copyright (c) 2017-2019 SabberStone Team, darkfriend77 & rnilva
// RosettaStone is hearthstone simulator using C++ with reinforcement learning.
// Copyright (c) 2019 Chris Ohk, Youngjoong Kim, SeungHyun Jeon
#include <Rosetta/Actions/Generic.hpp>
#include <Rosetta/Tasks... | // This code is based on Sabberstone project.
// Copyright (c) 2017-2019 SabberStone Team, darkfriend77 & rnilva
// RosettaStone is hearthstone simulator using C++ with reinforcement learning.
// Copyright (c) 2019 Chris Ohk, Youngjoong Kim, SeungHyun Jeon
#include <Rosetta/Actions/Generic.hpp>
#include <Rosetta/Tasks... | Delete code to call Destroy() method | feat(card-impl): Delete code to call Destroy() method
| C++ | mit | Hearthstonepp/Hearthstonepp,Hearthstonepp/Hearthstonepp |
9a2890cba41971a1f904f55a299fc2f8a0f3d75a | test/sanitizer_common/TestCases/Posix/sanitizer_set_death_callback_test.cc | test/sanitizer_common/TestCases/Posix/sanitizer_set_death_callback_test.cc | // RUN: %clangxx -O2 %s -o %t && not %run %t 2>&1 | FileCheck %s
// REQUIRES: stable-runtime
// XFAIL: ubsan
// FIXME(dliew): Make this test work on Darwin with LSan
// XFAIL: darwin && lsan
#include <sanitizer/common_interface_defs.h>
#include <stdio.h>
volatile char *zero = 0;
void Death() {
fprintf(stderr, "D... | // RUN: %clangxx -O2 %s -o %t && not %run %t 2>&1 | FileCheck %s
// REQUIRES: stable-runtime
// XFAIL: ubsan
// FIXME: On Darwin, LSAn detects the leak, but does not invoke the death_callback.
// XFAIL: darwin && lsan
#include <sanitizer/common_interface_defs.h>
#include <stdio.h>
volatile char *zero = 0;
void Dea... | Add comment explaining test failure | [LSan][Darwin][NFC] Add comment explaining test failure
git-svn-id: c199f293c43da69278bea8e88f92242bf3aa95f7@354290 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 |
1b05d87e4df957ba9f0605487f54c974f574b6e9 | src/default_benchmarks.cpp | src/default_benchmarks.cpp | /*
* Copyright © 2017 Collabora Ltd.
*
* This file is part of vkmark.
*
* vkmark 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
* version 2.1 of the License, or (at your option) any late... | /*
* Copyright © 2017 Collabora Ltd.
*
* This file is part of vkmark.
*
* vkmark 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
* version 2.1 of the License, or (at your option) any late... | Add texture scene variants to default benchmarks | main: Add texture scene variants to default benchmarks
| C++ | lgpl-2.1 | vkmark/vkmark,vkmark/vkmark,vkmark/vkmark |
8245048a7023a37055d8d6c7a421bce3fcf79e6b | OOPClasses/string_utils.cc | OOPClasses/string_utils.cc | //
// Copyright 2020 Google Inc.
//
// 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 agreed to... | //
// Copyright 2020 Google Inc.
//
// 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 agreed to... | Correct find_if_not predicate compile error. | Correct find_if_not predicate compile error.
| C++ | apache-2.0 | google/GTXiLib,google/GTXiLib,google/GTXiLib,google/GTXiLib |
55112fd0169b941a0d6fab21d4a11ddfcdc0c577 | unittests/mixer_test.cpp | unittests/mixer_test.cpp | #include <systemlib/mixer/mixer.h>
#include <systemlib/err.h>
#include "../../src/systemcmds/tests/tests.h"
int main(int argc, char *argv[]) {
warnx("Host execution started");
char* args[] = {argv[0], "../../ROMFS/px4fmu_common/mixers/IO_pass.mix",
"../../ROMFS/px4fmu_common/mixers/FMU_quad_w.mix"};
test_mix... | #include <systemlib/mixer/mixer.h>
#include <systemlib/err.h>
#include "../../src/systemcmds/tests/tests.h"
int main(int argc, char *argv[]) {
int ret;
warnx("Host execution started");
char* args[] = {argv[0], "../ROMFS/px4fmu_common/mixers/IO_pass.mix",
"../ROMFS/px4fmu_common/mixers/FMU_quad_w.mix"};
if... | Improve mixer test, no firm checks yet | Improve mixer test, no firm checks yet
| C++ | bsd-3-clause | jlecoeur/Firmware,PX4/Firmware,jlecoeur/Firmware,mje-nz/PX4-Firmware,PX4/Firmware,jlecoeur/Firmware,mje-nz/PX4-Firmware,acfloria/Firmware,PX4/Firmware,dagar/Firmware,Aerotenna/Firmware,krbeverx/Firmware,acfloria/Firmware,Aerotenna/Firmware,krbeverx/Firmware,mcgill-robotics/Firmware,mcgill-robotics/Firmware,dagar/Firmwa... |
72d52294ff9f992da3e10d9bc8e78c3643b75672 | src/modules/CorryvreckanWriter/corryvreckan/Object.cpp | src/modules/CorryvreckanWriter/corryvreckan/Object.cpp | // local
#include "Object.hpp"
#include "core/utils/exceptions.h"
using namespace corryvreckan;
Object::Object() : m_detectorID(), m_timestamp(0) {}
Object::Object(std::string detectorID) : m_detectorID(detectorID), m_timestamp(0) {}
Object::Object(double timestamp) : m_detectorID(), m_timestamp(timestamp) {}
Object... | // local
#include "Object.hpp"
#include "core/utils/exceptions.h"
using namespace corryvreckan;
Object::Object() : m_detectorID(), m_timestamp(0) {}
Object::Object(std::string detectorID) : m_detectorID(detectorID), m_timestamp(0) {}
Object::Object(double timestamp) : m_detectorID(), m_timestamp(timestamp) {}
Object... | Remove ClassImp as done for other classes in !139 | Remove ClassImp as done for other classes in !139
| C++ | mit | Koensw/allpix-squared,Koensw/allpix-squared,Koensw/allpix-squared,Koensw/allpix-squared |
bc4e30acee793d5397f30d68d8cbd7179e55b3a0 | taqo_client/linux/window_configuration.cc | taqo_client/linux/window_configuration.cc | #include "window_configuration.h"
const char *kFlutterWindowTitle = "taqo_client";
const unsigned int kFlutterWindowWidth = 1280;
const unsigned int kFlutterWindowHeight = 720;
| #include "window_configuration.h"
const char *kFlutterWindowTitle = "Taqo";
const unsigned int kFlutterWindowWidth = 1024;
const unsigned int kFlutterWindowHeight = 768;
| Fix window title and initial size | Fix window title and initial size
| C++ | apache-2.0 | google/taqo-paco,google/taqo-paco,google/taqo-paco,google/taqo-paco,google/taqo-paco,google/taqo-paco,google/taqo-paco,google/taqo-paco,google/taqo-paco |
d1f85ad81d63e2b503a1cd8842b475c41160acbb | src/pancake/PancakeTest.cpp | src/pancake/PancakeTest.cpp | /**
* \file PancakeTest.cpp
*
* Some simple tests to make sure the pancake domain works properly.
*
* \author eaburns
* \date 18-01-2010
*/
#include "pancake/PancakeTypes.hpp"
#include "pancake/PancakeState.hpp"
#include <stdlib.h>
int main(void)
{
boost::array<Pancake, 14> cakes;
for (unsigned int i = 0; ... | /**
* \file PancakeTest.cpp
*
* Some simple tests to make sure the pancake domain works properly.
*
* \author eaburns
* \date 18-01-2010
*/
#include "pancake/PancakeTypes.hpp"
#include "pancake/PancakeState.hpp"
#include <stdlib.h>
int main(void)
{
boost::array<Pancake, 14> cakes;
for (unsigned int i = 0; ... | Exit the pancake test with success instead of failure and print the hash values too. | Exit the pancake test with success instead of failure and print the
hash values too.
| C++ | bsd-3-clause | bradlarsen/switchback,bradlarsen/switchback |
8d544f7acbb3738c16e01dc80918abacbbc08130 | lib/file/ofstream.cpp | lib/file/ofstream.cpp | /*
Copyright 2008 Brain Research Institute, Melbourne, Australia
Written by Robert E. Smith, 04/08/14.
This file is part of MRtrix.
MRtrix 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,... | /*
Copyright 2008 Brain Research Institute, Melbourne, Australia
Written by Robert E. Smith, 04/08/14.
This file is part of MRtrix.
MRtrix 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,... | Use File::create() instead of File::output_file_check() | File::OFStream: Use File::create() instead of File::output_file_check()
This should provide slightly more robust behaviour regarding race conditions.
| C++ | mpl-2.0 | MRtrix3/mrtrix3,MRtrix3/mrtrix3,MRtrix3/mrtrix3,MRtrix3/mrtrix3,MRtrix3/mrtrix3,MRtrix3/mrtrix3 |
1729f48ba8ab790a00d5acb75f41d6f073dd8f6a | src/bindings/csharp/openalpr-net/AssemblyInfo.cpp | src/bindings/csharp/openalpr-net/AssemblyInfo.cpp | #include "stdafx.h"
using namespace System;
using namespace System::Reflection;
using namespace System::Runtime::CompilerServices;
using namespace System::Runtime::InteropServices;
using namespace System::Security::Permissions;
//
// General Information about an assembly is controlled through the following
// set of ... | #include "stdafx.h"
using namespace System;
using namespace System::Reflection;
using namespace System::Runtime::CompilerServices;
using namespace System::Runtime::InteropServices;
using namespace System::Security::Permissions;
//
// General Information about an assembly is controlled through the following
// set of ... | Fix visual studio deprecation warning. | Fix visual studio deprecation warning.
| C++ | agpl-3.0 | adi9090/openalpr,caroid/openalpr,marcostomazini/openalpr,thecocce/openalpr,Infixz/openalpr,Kees-V/openalpr,openalpr/openalpr,adi9090/openalpr,Infixz/openalpr,openalpr/openalpr,adi9090/openalpr,peters/openalpr,robertocarvajal/openalpr,peters/openalpr,robertocarvajal/openalpr,robertocarvajal/openalpr,Kees-V/openalpr,flav... |
995691c9bdbb206745f6a1020e7bcd48c8c995f4 | io/example/read-sink1/read-sink1.cc | io/example/read-sink1/read-sink1.cc | #include <unistd.h>
#include <event/event_callback.h>
#include <event/event_main.h>
#include <io/stream_handle.h>
class Sink {
LogHandle log_;
StreamHandle fd_;
Action *action_;
public:
Sink(int fd)
: log_("/sink"),
fd_(fd),
action_(NULL)
{
EventCallback *cb = callback(this, &Sink::read_complete);
a... | #include <unistd.h>
#include <event/callback_handler.h>
#include <event/event_callback.h>
#include <event/event_handler.h>
#include <event/event_main.h>
#include <io/stream_handle.h>
class Sink {
LogHandle log_;
StreamHandle fd_;
CallbackHandler close_handler_;
EventHandler read_handler_;
public:
Sink(int fd)
... | Convert to use Handlers. Could be simpler. | Convert to use Handlers. Could be simpler.
git-svn-id: 9e2532540f1574e817ce42f20b9d0fb64899e451@952 4068ffdb-0463-0410-8185-8cc71e3bd399
| C++ | bsd-2-clause | splbio/wanproxy,diegows/wanproxy,diegows/wanproxy,splbio/wanproxy,splbio/wanproxy,diegows/wanproxy |
e5274e6101000173853a990d09fa9872061e3ceb | compiler_version.cpp | compiler_version.cpp | #include <iostream>
int main() {
std::cout << "Hello, compiler!\n\n";
std::cout <<
#if defined(__clang__)
"Clang " << __clang_version__ <<
#elif defined(__ICC) || defined(__INTEL_COMPILER)
"Intel " << __INTEL_COMPILER <<
#elif defined(__GNUC__) || defined(__GNUG__)
"GCC " << __VERSION__ <<
#elif defined... | #include <iostream>
//toggle to check for boost version
#define CHECK_BOOST_VERSION 0
#if CHECK_BOOST_VERSION
#include <boost/version.hpp>
#endif
int main() {
std::cout << "Hello, compiler!\n\n";
std::cout <<
#if defined(__clang__)
"Clang " << __clang_version__ <<
#elif defined(__ICC) || defined(__INTEL_COM... | Add test for boost version | Add test for boost version
| C++ | unlicense | arnemertz/online-compilers,arnemertz/online-compilers |
e58a58d7dde40eef96faf92ce921b2cc5427a1cb | test/Index/ms-asm-no-target.cpp | test/Index/ms-asm-no-target.cpp | // RUN: c-index-test -test-load-source all -triple x86_64-apple-darwin10 -fasm-blocks -Wno-microsoft %s 2>&1 | FileCheck %s
// Test that we diagnose when the application hasn't initialized LLVM targets
// supporting the MS-style inline asm parser.
void Break() {
__asm { int 3 }
}
// CHECK: error: MS-style inline as... | // REQUIRES: x86-registered-target
// RUN: c-index-test -test-load-source all -fasm-blocks -Wno-microsoft %s 2>&1 | FileCheck %s
// Test that we diagnose when the application hasn't initialized LLVM targets
// supporting the MS-style inline asm parser.
void Break() {
__asm { int 3 }
}
// CHECK: error: MS-style inli... | Fix triple / REQUIRES in test from r193685 | Fix triple / REQUIRES in test from r193685
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@193686 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,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-cl... |
fd7dc0231f12eb2e0cd3d04de4e77d79ee330637 | src/yabs.cpp | src/yabs.cpp | #include "gen.h"
#include "interface.h"
#include <iostream>
int main(int argc, char *argv[])
{
Generate Gen;
std::string Args;
int i;
for (i = 1; i < argc; i++) {
if (argv[i] != NULL)
Args = argv[1];
if (argv[i] == NULL) {
}
if ((Args == "-new") || (Args == "--new") || (Args == "-n")) {
Gen.GenBlank... | #include <iostream>
#include "gen.h"
#include "interface.h"
int main(int argc, char *argv[])
{
Generate Gen;
std::string Args;
int i;
for (i = 1; i < argc; i++) {
if (argv[i] != NULL)
Args = argv[1];
if (argv[i] == NULL) {
}
if ((Args == "-new") || (Args == "--new") || (Args == "-n")) {
Gen.GenBlank... | Add interface for new Generate member functions | Add interface for new Generate member functions
Signed-off-by: Alberto Corona <c1a4158909d6c23f73df353c7cc0bbe963891a65@0x1a.us>
| C++ | bsd-3-clause | 0X1A/yabs,0X1A/yabs,0X1A/yabs,0X1A/yabs |
0015a8e6e31b765ae85ddbdf0ea8b50eaf4e428f | include/modules/game/playerHUD.cpp | include/modules/game/playerHUD.cpp | #include "playerHUD.hpp"
#include "player.hpp"
#include <sstream>
#include <SFML/Graphics/RenderWindow.hpp>
namespace aw
{
PlayerHUD::PlayerHUD()
{
m_font.loadFromFile("data/fonts/visitor1.ttf");
m_displaySpeed.setFont(m_font);
m_displaySpeed.setColor(sf::Color::White);
m_displaySpeed.setCharacterSize(18)... | #include "playerHUD.hpp"
#include "player.hpp"
#include <sstream>
#include <SFML/Graphics/RenderWindow.hpp>
namespace aw
{
PlayerHUD::PlayerHUD()
{
m_font.loadFromFile("data/fonts/visitor1.ttf");
m_displaySpeed.setFont(m_font);
m_displaySpeed.setColor(sf::Color::White);
m_displaySpeed.setCharacterSize(18)... | Use std::round to remove ugly float numbers | Use std::round to remove ugly float numbers
| C++ | mit | AlexAUT/Kroniax_Cpp |
1ef3a5e037e878e40e0f0a45abd03129daae85c4 | src/client.cc | src/client.cc | // Copyright 2014 Toggl Desktop developers.
#include "./client.h"
#include <sstream>
namespace kopsik {
std::string Client::String() {
std::stringstream ss;
ss << "ID=" << id_
<< " local_id=" << local_id_
<< " name=" << name_
<< " wid=" << wid_
<< " guid=" << guid_;
return ss.str();
}
void Client::S... | // Copyright 2014 Toggl Desktop developers.
#include "./client.h"
#include <sstream>
#include <cstring>
namespace kopsik {
std::string Client::String() {
std::stringstream ss;
ss << "ID=" << id_
<< " local_id=" << local_id_
<< " name=" << name_
<< " wid=" << wid_
<< " guid=" << guid_;
return ss.str()... | Fix strcmp include in lib | Fix strcmp include in lib
| C++ | bsd-3-clause | codeman38/toggldesktop,codeman38/toggldesktop,codeman38/toggldesktop,codeman38/toggldesktop,codeman38/toggldesktop,codeman38/toggldesktop |
96c351e1e9f48fc71152b7bb58ea4d2ce5d5086f | core/src/gameengine/entities/simple_item.cc | core/src/gameengine/entities/simple_item.cc | //
// simple_item.cc
// GameEngine
//
// Created by Jon Sharkey on 2010-04-30.
// Copyright 2010 Sharkable. All rights reserved.
//
#include "gameengine/entities/simple_item.h"
#include "gameengine/resource_loader.h"
using std::vector;
SimpleItem::SimpleItem()
: Animatable(),
sprite_(0) {
}
SimpleIte... | //
// simple_item.cc
// GameEngine
//
// Created by Jon Sharkey on 2010-04-30.
// Copyright 2010 Sharkable. All rights reserved.
//
#include "gameengine/entities/simple_item.h"
#include "gameengine/resource_loader.h"
using std::vector;
SimpleItem::SimpleItem()
: Animatable(),
sprite_(0) {
}
SimpleIte... | Return the correct Rect value for the anchor. | Return the correct Rect value for the anchor.
| C++ | apache-2.0 | sharkable/sharkengine,sharkable/sharkengine,sharkable/sharkengine,sharkable/sharkengine,sharkable/sharkengine |
4e1730ede6e42aa33ce4ba452b3127860b32c73a | src/cxx11_std_exception_ptr_etc_example.cpp | src/cxx11_std_exception_ptr_etc_example.cpp | // C++11 passing exceptions around using std::exception_ptr
#include <exception>
#include <thread>
#include <iostream>
#include <cassert>
std::exception_ptr g_stashed_exception_ptr;
auto bad_task() -> void
{
try
{
std::thread().detach(); // Oops !!
}
catch ( ... )
{
g_stashed_exception_ptr = std::c... | // C++11 passing exceptions around using std::exception_ptr
#include <exception>
#include <thread>
#include <iostream>
#include <cassert>
std::exception_ptr g_stashed_exception_ptr;
void bad_task()
{
try
{
std::thread().detach(); // Oops !!
}
catch ( ... )
{
g_stashed_exception_ptr = std::current_e... | Change to traditional style for function return type declarations rather than new trailing return type syntax - it is more consistent with rest of example code and shorter | Change to traditional style for function return type declarations rather than new trailing return type syntax - it is more consistent with rest of example code and shorter
| C++ | bsd-3-clause | ralph-mcardell/article-cxx11-exception-support-examples,ralph-mcardell/article-cxx11-exception-support-examples |
6b15bb777f7f1778c4ff2c2032f621002fa56190 | chrome/browser/extensions/extension_function.cc | chrome/browser/extensions/extension_function.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 "chrome/browser/extensions/extension_function.h"
#include "chrome/browser/extensions/extension_function_dispatcher.h"
void ExtensionFunctio... | // 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 "chrome/browser/extensions/extension_function.h"
#include "chrome/browser/extensions/extension_function_dispatcher.h"
void ExtensionFunctio... | Check that the ExtensionFunction has a callback for attempting to send a response. | Check that the ExtensionFunction has a callback for attempting to send a response.
Review URL: http://codereview.chromium.org/63130
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@13406 0039d316-1c4b-4281-b951-d872f2087c98
| C++ | bsd-3-clause | yitian134/chromium,Crystalnix/house-of-life-chromium,ropik/chromium,yitian134/chromium,gavinp/chromium,gavinp/chromium,Crystalnix/house-of-life-chromium,ropik/chromium,yitian134/chromium,yitian134/chromium,Crystalnix/house-of-life-chromium,yitian134/chromium,adobe/chromium,Crystalnix/house-of-life-chromium,gavinp/chrom... |
fb8283a9102ecf99a816be5cb563c96891127257 | src/cpp/tasks.cc | src/cpp/tasks.cc | #include <cpp/tasks.hh>
namespace cpp
{
void cpp_generator()
{
assert(ast::program_ast && "No ast to transform to cpp");
std::cout << "#include <repy/repy.hh>" << std::endl;
CodeGenerator cgen(std::cout);
cgen.visit(ast::program_ast);
cgen.generate_main();
}
... | #include <cpp/tasks.hh>
namespace cpp
{
void cpp_generator()
{
assert(ast::program_ast && "No ast to transform to cpp");
CodeGenerator cgen(std::cout);
cgen.visit(ast::program_ast);
cgen.generate_main();
}
void header_generator()
{
assert(ast::program_ast ... | Change include on generated C++ | [GENERATOR] Change include on generated C++
| C++ | mit | Nakrez/RePy,Nakrez/RePy |
69c59218dc97156a42cefd7a56e62b55b5f28544 | lib/MC/MCAsmInfoCOFF.cpp | lib/MC/MCAsmInfoCOFF.cpp | //===-- MCAsmInfoCOFF.cpp - COFF asm properties -----------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... | //===-- MCAsmInfoCOFF.cpp - COFF asm properties -----------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... | Revert part of my last commit. the mingw32 build bot doesn't seem to like it. | Revert part of my last commit. the mingw32 build bot doesn't seem to like it.
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@111793 91177308-0d34-0410-b5e6-96231b3b80d8
| C++ | apache-2.0 | apple/swift-llvm,apple/swift-llvm,dslab-epfl/asap,apple/swift-llvm,llvm-mirror/llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,apple/swift-llvm,dslab-epfl/asap,chubbymaggie/asap,llvm-mirror/llvm,llvm-mirror/llvm,chubbymaggie/asap,dslab-epfl/asap,llvm-mirror/llvm,chubbymaggie/asap,llvm-mirror/llvm,llvm-mirror/llvm,apple/swift... |
4d5b46a4ab2b041cb57466de923fdb9c107d90f6 | ascii2hex.cpp | ascii2hex.cpp | #include <iostream>
#include <vector>
#include <iomanip>
#include <stdlib.h>
#include <string.h>
#include <stdint.h>
#include <stdlib.h>
#include <stdio.h>
using namespace std;
// printes the hex (in ascii) of an ascii message
int main(int argc, char* argv[])
{
if(argc < 2) {
cerr << "Usage: " << argv[... | #include <iostream>
#include <vector>
#include <iomanip>
#include <stdlib.h>
#include <string.h>
#include <stdint.h>
#include <stdlib.h>
#include <stdio.h>
using namespace std;
// printes the hex (in ascii) of an ascii message
int main(int argc, char* argv[])
{
if(argc < 1 || (argc>=2 && strcmp(argv[1],"-h")==... | Make so it reads from stdin if no argument is given | Make so it reads from stdin if no argument is given
| C++ | unlicense | LarsFlaeten/crypto,LarsFlaeten/crypto,LarsFlaeten/crypto |
f821f13314c0a16eb1db638d7855adb23f76bf1c | audioutil.cpp | audioutil.cpp | #include "audioutil.h"
#include <QFileInfo>
namespace AudioUtil {
QStringList audioExtensions = { "wav", "aif", "ogg", "flac", "iff", "svx" };
bool isAudioFileName(QString file)
{
return audioExtensions.contains(QFileInfo(file).suffix().toLower());
}
QString audioFileFilter()
{
QString f = "Audio Files (";
... | #include "audioutil.h"
#include <QFileInfo>
namespace AudioUtil {
QStringList audioExtensions = { "wav", "caf", "aif", "ogg", "flac", "iff", "svx" };
bool isAudioFileName(QString file)
{
return audioExtensions.contains(QFileInfo(file).suffix().toLower());
}
QString audioFileFilter()
{
QString f = "Audio Fil... | Add support for .caf extension | Add support for .caf extension
| C++ | unlicense | KaiDrange/OctaChainer,KaiDrange/OctaChainer |
5e2ff962a4427fa08b960ac53ff09553453b2bb9 | test/Tooling/remove-cstr-calls.cpp | test/Tooling/remove-cstr-calls.cpp | // RUN: rm -rf %t
// RUN: mkdir %t
// RUN: echo '[{"directory":".","command":"clang++ '$(llvm-config --cppflags all)' -c %s","file":"%s"}]' > %t/compile_commands.json
// RUN: remove-cstr-calls %t %s | FileCheck %s
#include <string>
namespace llvm { struct StringRef { StringRef(const char *p); }; }
void f1(const std:... | // RUN: rm -rf %t
// RUN: mkdir %t
// RUN: echo '[{"directory":".","command":"clang++ '$(llvm-config --cppflags all)' -c %s","file":"%s"}]' > %t/compile_commands.json
// RUN: remove-cstr-calls %t %s | FileCheck %s
// XFAIL: *
#include <string>
namespace llvm { struct StringRef { StringRef(const char *p); }; }
void f... | Fix test breakage due to example not being built. | Fix test breakage due to example not being built.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@132376 91177308-0d34-0410-b5e6-96231b3b80d8
| C++ | apache-2.0 | llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/cl... |
d2debb5ab6a9c38a0e8ca207c768d37165397ee7 | source/tests/tests-main.cpp | source/tests/tests-main.cpp | #include "tests-base.hpp"
#include "utf8rewind.h"
int main(int argc, char** argv)
{
const char* input = "Hello World!";
static const size_t output_size = 256;
char output[output_size];
wchar_t output_wide[output_size];
const char* input_seek;
size_t converted_size;
int32_t errors;
memset(outp... | #include "tests-base.hpp"
int main(int argc, char** argv)
{
::testing::InitGoogleTest(&argc, argv);
int result = RUN_ALL_TESTS();
if (result != 0)
{
std::cout << "Press any key to continue.";
int wait = 0;
std::cin >> wait;
}
return result;
} | Clean up main entry point. | Clean up main entry point.
| C++ | mit | tkelman/utf8rewind,tkelman/utf8rewind,tkelman/utf8rewind,tkelman/utf8rewind |
220cb6b54e5639adec7fbc0edefc23156527cc9e | net/base/run_all_unittests.cc | net/base/run_all_unittests.cc | // Copyright (c) 2010 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/histogram.h"
#include "net/base/net_test_suite.h"
#if defined(OS_WIN)
#include "net/socket/ssl_client_socket_nss_factory.h"
#endif
int... | // Copyright (c) 2010 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 "build/build_config.h"
#include "base/histogram.h"
#include "net/base/net_test_suite.h"
#if defined(OS_WIN)
#include "net/socket/ssl_client_s... | Include "build/build_config.h" explicitly because we test the OS_WIN macro. | Include "build/build_config.h" explicitly because we test the
OS_WIN macro.
R=willchan
BUG=43142
TEST=No compilation error.
Review URL: http://codereview.chromium.org/1929005
git-svn-id: http://src.chromium.org/svn/trunk/src@46367 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Former-commit-id: 9df0e2ea7ef365d6caeba391cbc2486... | 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... |
8d7d0ccf6620117d212979cd3f86f86aab8bfd80 | src/texture.cpp | src/texture.cpp | #include "texture.h"
spectrum SolidColor::at_point(const IntersectionView& isect) const
{
return color;
}
spectrum SolidColor::at_coord(const Vec2& uv) const
{
return color;
}
Checkerboard2D::Checkerboard2D(spectrum a, spectrum b, int gsx, int gsy)
: c1(a), c2(b), grid_size_x(gsx), grid_size_y(gsy > 0 ? gsy : ... | #include "texture.h"
spectrum SolidColor::at_point(const IntersectionView& isect) const
{
return color;
}
spectrum SolidColor::at_coord(const Vec2& uv) const
{
return color;
}
Checkerboard2D::Checkerboard2D(spectrum a, spectrum b, int gsx, int gsy)
: c1(a), c2(b), grid_size_x(gsx), grid_size_y(gsy > 0 ? gsy : ... | Fix checkerboard for negative uv | Fix checkerboard for negative uv
| C++ | mit | masonium/twinkle,masonium/twinkle |
22e3b2af5014c449b5546aca8f95bfd13adf7b01 | test/std/thread/futures/futures.task/futures.task.members/ctor1.fail.cpp | test/std/thread/futures/futures.task/futures.task.members/ctor1.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 more test cases to packaged_task copyability test | Add more test cases to packaged_task copyability test
git-svn-id: 756ef344af921d95d562d9e9f9389127a89a6314@289034 91177308-0d34-0410-b5e6-96231b3b80d8
| C++ | apache-2.0 | llvm-mirror/libcxx,llvm-mirror/libcxx,llvm-mirror/libcxx,llvm-mirror/libcxx,llvm-mirror/libcxx |
5849df7a0ab8819181f65981db36b26d61ba9b30 | test/asan/TestCases/Linux/init_fini_sections.cc | test/asan/TestCases/Linux/init_fini_sections.cc | // RUN: %clangxx_asan %s -o %t && %run %t | FileCheck %s
#include <stdio.h>
static void foo() {
printf("foo\n");
}
int main() {
return 0;
}
__attribute__((section(".preinit_array")))
void (*call_foo)(void) = &foo;
__attribute__((section(".init_array")))
void (*call_foo_2)(void) = &foo;
__attribute__((section(... | // RUN: %clangxx_asan %s -o %t && %run %t | FileCheck %s
#include <stdio.h>
int c = 0;
static void foo() {
++c;
}
static void fini() {
printf("fini\n");
}
int main() {
printf("c=%d\n", c);
return 0;
}
__attribute__((section(".preinit_array")))
void (*call_foo)(void) = &foo;
__attribute__((section(".init_... | Fix test on Android i686/fugu | [asan] Fix test on Android i686/fugu
printf from .preinit_array may crash.
git-svn-id: c199f293c43da69278bea8e88f92242bf3aa95f7@306940 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 |
bb33a8368a002e643dbcb9d8a43ce3bec31baa1e | QGVCore/private/QGVGraphPrivate.cpp | QGVCore/private/QGVGraphPrivate.cpp | #include "QGVGraphPrivate.h"
QGVGraphPrivate::QGVGraphPrivate(Agraph_t *graph)
{
setGraph(graph);
}
void QGVGraphPrivate::setGraph(Agraph_t *graph)
{
_graph = graph;
}
Agraph_t* QGVGraphPrivate::graph() const
{
return _graph;
}
| #include "QGVGraphPrivate.h"
QGVGraphPrivate::QGVGraphPrivate(Agraph_t *graph)
: _graph (NULL)
{
setGraph(graph);
}
void QGVGraphPrivate::setGraph(Agraph_t *graph)
{
if (_graph != NULL)
agclose(_graph);
_graph = graph;
}
Agraph_t* QGVGraphPrivate::graph() const
{
return _graph;
}
| Call agclose when clearing the graph | Call agclose when clearing the graph
| C++ | lgpl-2.1 | humanoid-path-planner/qgv,humanoid-path-planner/qgv |
8506a5f04095643fc10c2b62c494ea08ac205bdd | contextd/unit-tests/boolsysfspooler/boolsysfspoolerunittest.cpp | contextd/unit-tests/boolsysfspooler/boolsysfspoolerunittest.cpp | /*
* Copyright (C) 2008, 2009 Nokia Corporation.
*
* Contact: Marius Vollmer <marius.vollmer@nokia.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* version 2.1 as published by the Free Software Foundation.
*
* This lib... | /*
* Copyright (C) 2008, 2009 Nokia Corporation.
*
* Contact: Marius Vollmer <marius.vollmer@nokia.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* version 2.1 as published by the Free Software Foundation.
*
* This lib... | Test missing file in BoolSysFsPooler. | Test missing file in BoolSysFsPooler.
| C++ | lgpl-2.1 | rburchell/ck,rburchell/ck,rburchell/ck,rburchell/ck,rburchell/ck |
12c142fbbf64508234c24095c595194f50d7e7b9 | You-DataStore/datastore.cpp | You-DataStore/datastore.cpp | #include "stdafx.h"
#include "internal/internal_datastore.h"
#include "internal/constants.h"
#include "datastore.h"
namespace You {
namespace DataStore {
DataStore& DataStore::get() {
static DataStore ds;
return ds;
}
Transaction DataStore::begin() {
return Internal::DataStore::get().begin();
}
void DataStore::p... | #include "stdafx.h"
#include "internal/internal_datastore.h"
#include "internal/constants.h"
#include "datastore.h"
namespace You {
namespace DataStore {
DataStore& DataStore::get() {
static DataStore ds;
return ds;
}
Transaction DataStore::begin() {
return Internal::DataStore::get().begin();
}
void DataStore::p... | Fix post, put, erase for tasks to follow the changes | Fix post, put, erase for tasks to follow the changes
| C++ | mit | cs2103aug2014-w10-1c/main,cs2103aug2014-w10-1c/main |
a6b53489e6ff0673d2ead369fd4ec7f5e7a95e2f | modules/imgproc/perf/perf_bilateral.cpp | modules/imgproc/perf/perf_bilateral.cpp | #include "perf_precomp.hpp"
using namespace std;
using namespace cv;
using namespace perf;
using namespace testing;
using std::tr1::make_tuple;
using std::tr1::get;
CV_ENUM(Mat_Type, CV_8UC1, CV_8UC3, CV_32FC1, CV_32FC3)
typedef TestBaseWithParam< tr1::tuple<Size, int, Mat_Type> > TestBilateralFilter;
PERF_TEST_P( ... | #include "perf_precomp.hpp"
using namespace std;
using namespace cv;
using namespace perf;
using namespace testing;
using std::tr1::make_tuple;
using std::tr1::get;
CV_ENUM(Mat_Type, CV_8UC1, CV_8UC3, CV_32FC1, CV_32FC3)
typedef TestBaseWithParam< tr1::tuple<Size, int, Mat_Type> > TestBilateralFilter;
PERF_TEST_P( ... | Change sanity check for perfomance test of bilateral filter | Change sanity check for perfomance test of bilateral filter
| C++ | bsd-3-clause | apavlenko/opencv,opencv/opencv,opencv/opencv,opencv/opencv,opencv/opencv,opencv/opencv,opencv/opencv,apavlenko/opencv,apavlenko/opencv,opencv/opencv,apavlenko/opencv,apavlenko/opencv,opencv/opencv,opencv/opencv,apavlenko/opencv,opencv/opencv |
8a37b937aa5006add98779b1bf3e01fcab8fb053 | lightsout.cpp | lightsout.cpp | #include <ncurses.h>
#include "lightsout.hpp"
namespace roadagain
{
lightsout::lightsout(int width, int height) : width(width), height(height)
{
lights = new bool*[height + 2]();
for (int i = 0; i < height + 2; i++){
lights[i] = new bool[width + 2]();
}
}
lightsout::~lightsout()
{
;
}
}
| #include <ncurses.h>
#include "lightsout.hpp"
namespace roadagain
{
board::board(int width, int height) : width(width), height(height)
{
lights = new bool*[height + 2]();
for (int i = 0; i < height + 2; i++){
lights[i] = new bool[width + 2]();
}
}
board::~board()
{
;
}
}
| Fix name of class and constructor | Fix name of class and constructor
| C++ | mit | Roadagain/KeyBindings-LightsOut |
817d0a414d63f6faca28fbf197b9dcd557b6ae0a | xcodec/xcodec_encoder_pipe.cc | xcodec/xcodec_encoder_pipe.cc | #include <common/buffer.h>
#include <event/action.h>
#include <event/callback.h>
#include <event/event_system.h>
#include <io/pipe.h>
#include <xcodec/xcodec.h>
#include <xcodec/xcodec_encoder.h>
#include <xcodec/xcodec_encoder_pipe.h>
XCodecEncoderPipe::XCodecEncoderPipe(XCodec *codec)
: PipeSimple("/xcodec/encode... | #include <common/buffer.h>
#include <event/action.h>
#include <event/callback.h>
#include <event/event_system.h>
#include <io/pipe.h>
#include <xcodec/xcodec.h>
#include <xcodec/xcodec_encoder.h>
#include <xcodec/xcodec_encoder_pipe.h>
XCodecEncoderPipe::XCodecEncoderPipe(XCodec *codec)
: PipeSimple("/xcodec/encode... | Remove output_spontaneous use for now. | Remove output_spontaneous use for now.
git-svn-id: 9e2532540f1574e817ce42f20b9d0fb64899e451@568 4068ffdb-0463-0410-8185-8cc71e3bd399
| C++ | bsd-2-clause | diegows/wanproxy,splbio/wanproxy,splbio/wanproxy,diegows/wanproxy,diegows/wanproxy,splbio/wanproxy |
f6c3e97b8907856ee671db1e598186fdb4697c89 | test/ofp/hello_unittest.cpp | test/ofp/hello_unittest.cpp | #include "ofp/unittest.h"
#include "ofp/hello.h"
using namespace ofp;
TEST(hello, HelloBuilder1) {
HelloBuilder msg{ProtocolVersions{1, 2, 3, 4}};
MemoryChannel channel{99};
msg.send(&channel);
EXPECT_EQ(0x10, channel.size());
EXPECT_HEX("0400-0010-00000001 00010008-0000001E", channel.data(),
... | #include "ofp/unittest.h"
#include "ofp/hello.h"
using namespace ofp;
TEST(hello, HelloBuilder1) {
HelloBuilder msg{ProtocolVersions{1, 2, 3, 4}};
MemoryChannel channel{99};
msg.send(&channel);
EXPECT_EQ(0x10, channel.size());
EXPECT_HEX("0400-0010-00000001 00010008-0000001E", channel.data(),
... | Add a HelloBuilder unit test. | Add a HelloBuilder unit test.
| C++ | mit | byllyfish/oftr,byllyfish/libofp,byllyfish/oftr,byllyfish/libofp,byllyfish/oftr,byllyfish/libofp,byllyfish/oftr,byllyfish/oftr |
d405899a654902d600aa9307b10c9f4d68316115 | src/prefix.cc | src/prefix.cc | #include <map>
#include <ncurses.h>
#include <string>
#include "file_contents.hh"
#include "mode.hh"
#include "show_message.hh"
#include "prefix.hh"
prefix::prefix(std::string message)
: message(message) { }
void prefix::push_back(char ch, std::function<void(contents&, boost::optional<int>)> fun) {
this->map... | #include <map>
#include <ncurses.h>
#include <string>
#include "file_contents.hh"
#include "mode.hh"
#include "show_message.hh"
#include "prefix.hh"
prefix::prefix(std::string message)
: message(message) { }
void prefix::push_back(char ch, std::function<void(contents&, boost::optional<int>)> fun) {
this->map... | Make lambda capture *pointer* to ``this`` by value | Make lambda capture *pointer* to ``this`` by value
| C++ | mpl-2.0 | czipperz/vick,czipperz/vick |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.