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
f28517551f55927121f7015c0afa3747b67191d8
templates/function.mstch.cpp
templates/function.mstch.cpp
{{{header}}} {{#includes}} #include <{{{.}}}> {{/includes}} {{{precontent}}} #include <boost/python.hpp> #include <cmath> /* postinclude */ void {{function.mangled_name}}() { ::boost::python::object parent_object(::boost::python::scope(){{! }}{{#function.scope}}{{#name}}.attr("{{name}}"){{/name}}{{/function.scope...
{{{header}}} {{#includes}} #include <{{{.}}}> {{/includes}} {{{precontent}}} #include <boost/python.hpp> #include <cmath> /* postinclude */ void {{function.mangled_name}}() { ::boost::python::object parent_object(::boost::python::scope(){{! }}{{#function.scope}}{{#name}}.attr("{{name}}"){{/name}}{{/function.scope...
Support for overloads on free functions.
Support for overloads on free functions.
C++
bsd-2-clause
personalrobotics/dartpy,personalrobotics/dartpy,personalrobotics/dartpy
4a094ad81b6f4261af9847e078b8499f62a4bdb2
compiler/traversals/removeNamedParameters.cpp
compiler/traversals/removeNamedParameters.cpp
#include "removeNamedParameters.h" #include "expr.h" #include "stmt.h" void RemoveNamedParameters::postProcessExpr(Expr* expr) { if (NamedExpr* named_expr = dynamic_cast<NamedExpr*>(expr)) { named_expr->replace(named_expr->actual->copy()); } if (VarInitExpr* var_init = dynamic_cast<VarInitExpr*>(expr)) { ...
#include "removeNamedParameters.h" #include "expr.h" #include "stmt.h" void RemoveNamedParameters::postProcessExpr(Expr* expr) { if (NamedExpr* named_expr = dynamic_cast<NamedExpr*>(expr)) { named_expr->replace(named_expr->actual->copy()); } if (VarInitExpr* var_init = dynamic_cast<VarInitExpr*>(expr)) { ...
Insert an assert to catch a bad VarInit variable type.
Insert an assert to catch a bad VarInit variable type. git-svn-id: 88467cb1fb04b8a755be7e1ee1026be4190196ef@2638 3a8e244f-b0f2-452b-bcba-4c88e055c3ca
C++
apache-2.0
sungeunchoi/chapel,hildeth/chapel,sungeunchoi/chapel,hildeth/chapel,chizarlicious/chapel,CoryMcCartan/chapel,hildeth/chapel,CoryMcCartan/chapel,sungeunchoi/chapel,chizarlicious/chapel,CoryMcCartan/chapel,hildeth/chapel,chizarlicious/chapel,hildeth/chapel,hildeth/chapel,sungeunchoi/chapel,chizarlicious/chapel,sungeuncho...
9f806bce6bc6e43cf9b4c1e350165139bb09da84
include/dota2api/details.cpp
include/dota2api/details.cpp
#include "details.hpp" #include "json/json.h" dota2::DetailsRequest &dota2::DetailsRequest::id(MatchID id) { query.insert({"match_id", std::to_string(id)}); return *this; } dota2::Details::Details(const Json::Value &json) { const auto& result = json["result"]; matchID = result["match_id"].asInt(); ...
#include "details.hpp" #include "json/json.h" dota2::DetailsRequest &dota2::DetailsRequest::id(MatchID id) { query.insert({"match_id", std::to_string(id)}); return *this; } dota2::Details::Details(const Json::Value &json) { const auto& result = json["result"]; matchID = result["match_id"].asInt(); ...
Change if/else to ternary if
Change if/else to ternary if
C++
apache-2.0
UnrealQuester/dota2Cmd
4ba8efd5fddb8f04bbd1c63098d10f19899f0e28
src/Editor/GUI/Button.cpp
src/Editor/GUI/Button.cpp
#include "Button.hpp" #include <Engine/Geometry/Rectangle.hpp> #include <Engine/Util/Input.hpp> using namespace GUI; Button::Button(Widget* parent) : Widget(parent) { mouseHover = false; hasClickedCallback = false; size = glm::vec2(64.f, 64.f); } Button::~Button() { } void Button::Update() { d...
#include "Button.hpp" #include <Engine/Geometry/Rectangle.hpp> #include <Engine/Util/Input.hpp> #include <Engine/Physics/Rectangle.hpp> using namespace GUI; Button::Button(Widget* parent) : Widget(parent) { mouseHover = false; hasClickedCallback = false; size = glm::vec2(64.f, 64.f); } Button::~Button()...
Use rectangle-point collision in button.
Use rectangle-point collision in button.
C++
mit
Chainsawkitten/HymnToBeauty,Chainsawkitten/LargeGameProjectEngine,Chainsawkitten/LargeGameProjectEngine,Chainsawkitten/HymnToBeauty
0b04c437a72c39612663471d47f965d64e6fed12
src/Framework/Storage/StorageDeleteFileChunkJob.cpp
src/Framework/Storage/StorageDeleteFileChunkJob.cpp
#include "StorageDeleteFileChunkJob.h" #include "System/Stopwatch.h" #include "System/FileSystem.h" #include "StorageFileChunk.h" StorageDeleteFileChunkJob::StorageDeleteFileChunkJob(StorageFileChunk* chunk_) { chunk = chunk_; } void StorageDeleteFileChunkJob::Execute() { Stopwatch sw; Buffer filen...
#include "StorageDeleteFileChunkJob.h" #include "System/Stopwatch.h" #include "System/FileSystem.h" #include "StorageFileChunk.h" StorageDeleteFileChunkJob::StorageDeleteFileChunkJob(StorageFileChunk* chunk_) { chunk = chunk_; } void StorageDeleteFileChunkJob::Execute() { Stopwatch sw; Buffer filen...
Test commit for testing EXPERIMENTAL code trigger.
Test commit for testing EXPERIMENTAL code trigger.
C++
agpl-3.0
scalien/scaliendb,timoc/scaliendb,timoc/scaliendb,scalien/scaliendb,timoc/scaliendb,timoc/scaliendb,timoc/scaliendb,timoc/scaliendb,scalien/scaliendb,timoc/scaliendb,scalien/scaliendb,timoc/scaliendb,timoc/scaliendb,scalien/scaliendb,scalien/scaliendb,scalien/scaliendb,scalien/scaliendb
17564f88acd1a7bc2953eb87d92416b8511113d9
src/miniMAT/ast/WhoStmt.cpp
src/miniMAT/ast/WhoStmt.cpp
#include <miniMAT/ast/WhoStmt.hpp> #include <iostream> namespace miniMAT { namespace ast { std::string WhoStmt::GetClassName() const { return "WhoStmt"; } void WhoStmt::VisitDisplay(const std::string& prefix) const { using namespace miniMAT::visit::display; ...
#include <miniMAT/ast/WhoStmt.hpp> #include <iostream> namespace miniMAT { namespace ast { std::string WhoStmt::GetClassName() const { return "WhoStmt"; } void WhoStmt::VisitDisplay(const std::string& prefix) const { using namespace miniMAT::visit::display; ...
Fix formatting in 'who' command
Fix formatting in 'who' command
C++
mit
fmenozzi/miniMAT,fmenozzi/miniMAT
b90791e2a462175e40232ec77eee844ad5067e91
net/ftp/ftp_network_layer.cc
net/ftp/ftp_network_layer.cc
// 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 "net/ftp/ftp_network_layer.h" #include "net/ftp/ftp_network_session.h" #include "net/ftp/ftp_network_transaction.h" #include "net/socket/cli...
// 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 "net/ftp/ftp_network_layer.h" #include "net/ftp/ftp_network_session.h" #include "net/ftp/ftp_network_transaction.h" #include "net/socket/cli...
Remove dead code in FtpNetworkLayer
Remove dead code in FtpNetworkLayer BUG=488592 Review URL: https://codereview.chromium.org/1289083006 Cr-Commit-Position: 972c6d2dc6dd5efdad1377c0d224e03eb8f276f7@{#344506}
C++
bsd-3-clause
CapOM/ChromiumGStreamerBackend,ltilve/ChromiumGStreamerBackend,CapOM/ChromiumGStreamerBackend,CapOM/ChromiumGStreamerBackend,ltilve/ChromiumGStreamerBackend,CapOM/ChromiumGStreamerBackend,ltilve/ChromiumGStreamerBackend,CapOM/ChromiumGStreamerBackend,ltilve/ChromiumGStreamerBackend,CapOM/ChromiumGStreamerBackend,ltilve...
f317c4d69e8e6fdd41eeca7852311b5eb501b803
test/WordDecoder_test.cpp
test/WordDecoder_test.cpp
#include <catch.hpp> #include "WordDecoder.hpp" namespace { using namespace Core8; TEST_CASE("Decode X from pattern vXvv", "[decoder]") { REQUIRE(WordDecoder::readX(0x0F00) == 0XF); REQUIRE(WordDecoder::readX(0xF0FF) == 0X0); } TEST_CASE("Decode Y from pattern vvYv", "[decoder]") { REQUIRE(WordDecoder::readY...
#include <catch.hpp> #include "WordDecoder.hpp" namespace { using namespace Core8; TEST_CASE("Decode X from pattern vXvv", "[decoder]") { REQUIRE(WordDecoder::readX(0x0F00) == 0XF); REQUIRE(WordDecoder::readX(0xF0FF) == 0X0); } TEST_CASE("Decode Y from pattern vvYv", "[decoder]") { REQUIRE(WordDecoder::readY...
Fix test with wrong function call
Fix test with wrong function call
C++
mit
benvenutti/core8,benvenutti/core8
49d2759d446860220a66ebaef855512353d5fca3
src/plugins/declarative/RelatedActivities.cpp
src/plugins/declarative/RelatedActivities.cpp
// // This file is part of the Marble Virtual Globe. // // This program is free software licensed under the GNU LGPL. You can // find a copy of this license in LICENSE.txt in the top directory of // the source code. // // Copyright 2011 Daniel Marth <danielmarth@gmx.at> // #include "RelatedActivities.h" namespac...
// // This file is part of the Marble Virtual Globe. // // This program is free software licensed under the GNU LGPL. You can // find a copy of this license in LICENSE.txt in the top directory of // the source code. // // Copyright 2011 Daniel Marth <danielmarth@gmx.at> // #include "RelatedActivities.h" namespac...
Fix build failure due to missing newline Patch by tropikhajma, thanks! CCBUG: 291907
Fix build failure due to missing newline Patch by tropikhajma, thanks! CCBUG: 291907
C++
lgpl-2.1
David-Gil/marble-dev,adraghici/marble,Earthwings/marble,tucnak/marble,AndreiDuma/marble,Earthwings/marble,oberluz/marble,oberluz/marble,tucnak/marble,tzapzoor/marble,probonopd/marble,utkuaydin/marble,AndreiDuma/marble,utkuaydin/marble,David-Gil/marble-dev,utkuaydin/marble,David-Gil/marble-dev,quannt24/marble,Earthwings...
8763baf23005220b7315f8fc3f2950516bfbbea3
tests/relevant_graphs.cpp
tests/relevant_graphs.cpp
#include "../kontsevich_graph_series.hpp" #include <string> using namespace std; int main(int argc, char* argv[]) { if (argc != 2) { cout << "Usage: " << argv[0] << " [order]\n"; return 1; } size_t order = stoi(argv[1]); set<KontsevichGraph> relevants = KontsevichGraph::graphs(orde...
#include "../kontsevich_graph_series.hpp" #include <string> using namespace std; int main(int argc, char* argv[]) { if (argc != 2) { cout << "Usage: " << argv[0] << " [order]\n"; return 1; } size_t order = stoi(argv[1]); set<KontsevichGraph> relevants = KontsevichGraph::graphs(orde...
Declare zero graphs also to be relevant (may yield non-trivial cyclic weight relations).
Declare zero graphs also to be relevant (may yield non-trivial cyclic weight relations).
C++
mit
rburing/kontsevich_graph_series-cpp
d32c8b7dd74b3956b43590878b82ae74f8162bd7
src/compiler/build_tables/item_set_closure.cc
src/compiler/build_tables/item_set_closure.cc
#include "compiler/build_tables/item_set_closure.h" #include <algorithm> #include <set> #include "tree_sitter/compiler.h" #include "compiler/build_tables/follow_sets.h" #include "compiler/build_tables/item.h" #include "compiler/prepared_grammar.h" namespace tree_sitter { using std::set; using rules::Symbol; ...
#include "compiler/build_tables/item_set_closure.h" #include <algorithm> #include <set> #include "tree_sitter/compiler.h" #include "compiler/build_tables/follow_sets.h" #include "compiler/build_tables/item.h" #include "compiler/prepared_grammar.h" namespace tree_sitter { using std::set; using rules::Symbol; ...
Use const references in a few more places
Use const references in a few more places
C++
mit
tree-sitter/tree-sitter,tree-sitter/tree-sitter,tree-sitter/tree-sitter,tree-sitter/tree-sitter,tree-sitter/tree-sitter,tree-sitter/tree-sitter,tree-sitter/tree-sitter
3a59ae67834165ec18dc85563992ae58f9c38969
test/std/atomics/atomics.types.operations/atomics.types.operations.req/ctor.pass.cpp
test/std/atomics/atomics.types.operations/atomics.types.operations.req/ctor.pass.cpp
//===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure // // This file is dual licensed under the MIT and the University of Illinois Open // Source Licenses. See LICENSE.TXT for details. // //===----------------------------------------...
//===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure // // This file is dual licensed under the MIT and the University of Illinois Open // Source Licenses. See LICENSE.TXT for details. // //===----------------------------------------...
Mark this test as XFAIL with older compilers, since they hit PR18097
Mark this test as XFAIL with older compilers, since they hit PR18097 git-svn-id: 756ef344af921d95d562d9e9f9389127a89a6314@242967 91177308-0d34-0410-b5e6-96231b3b80d8
C++
apache-2.0
llvm-mirror/libcxx,llvm-mirror/libcxx,llvm-mirror/libcxx,llvm-mirror/libcxx,llvm-mirror/libcxx
9d46cd550761480c25eba51198e9d08068ba4c3f
test/C++Frontend/2007-05-23-TryFinally.cpp
test/C++Frontend/2007-05-23-TryFinally.cpp
// RUN: %llvmgxx %s -S -emit-llvm -O2 -o - | grep -c {handle\\|_Unwind_Resume} | grep {\[14\]} struct One { }; struct Two { }; void handle_unexpected () { try { throw; } catch (One &) { throw Two (); } }
// RUN: %llvmgxx %s -S -emit-llvm -O2 -o - | ignore grep _Unwind_Resume | \ // RUN: wc -l | grep {\[03\]} struct One { }; struct Two { }; void handle_unexpected () { try { throw; } catch (One &) { throw Two (); } }
Use "ignore" rather than grep tricks.
Use "ignore" rather than grep tricks. git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@37592 91177308-0d34-0410-b5e6-96231b3b80d8
C++
apache-2.0
apple/swift-llvm,apple/swift-llvm,chubbymaggie/asap,dslab-epfl/asap,llvm-mirror/llvm,chubbymaggie/asap,apple/swift-llvm,dslab-epfl/asap,apple/swift-llvm,chubbymaggie/asap,llvm-mirror/llvm,llvm-mirror/llvm,llvm-mirror/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,chubby...
c612123cc5dd074b46ec769950b14324e9221605
keychain_dbus.cpp
keychain_dbus.cpp
/****************************************************************************** * Copyright (C) 2011 Frank Osterfeld <frank.osterfeld@gmail.com> * * * * This program is distributed in the hope that it will be useful, but * ...
/****************************************************************************** * Copyright (C) 2011 Frank Osterfeld <frank.osterfeld@gmail.com> * * * * This program is distributed in the hope that it will be useful, but * ...
Implement dbus stub for async API.
Implement dbus stub for async API.
C++
bsd-2-clause
seem-sky/qtkeychain,seem-sky/qtkeychain
95e0ee58ffc6afc09f0a7a29b4a8fe02c74297bc
lib/asan/lit_tests/TestCases/strerror_r_test.cc
lib/asan/lit_tests/TestCases/strerror_r_test.cc
// RUN: %clangxx_asan -O0 %s -o %t && %t // Regression test for PR17138. #include <assert.h> #include <string.h> int main() { char buf[1024]; char *res = (char *)strerror_r(300, buf, sizeof(buf)); assert(res != 0); return 0; }
// RUN: %clangxx_asan -O0 %s -o %t && %t // Regression test for PR17138. #include <assert.h> #include <string.h> #include <stdio.h> int main() { char buf[1024]; char *res = (char *)strerror_r(300, buf, sizeof(buf)); printf("%p\n", res); return 0; }
Remove a check from strerror_r test.
Remove a check from strerror_r test. It's not always true: on Android, strerror_r with invalid errno prints "Unknown error ..." to the buffer and returns 0. This test now only checks that strerror_r does not crash. git-svn-id: c199f293c43da69278bea8e88f92242bf3aa95f7@201321 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
b889b693e478c523afdf21ed64e401c646a8ac40
lib/Target/MRegisterInfo.cpp
lib/Target/MRegisterInfo.cpp
//===- MRegisterInfo.cpp - Target Register Information Implementation -----===// // // This file implements the MRegisterInfo interface. // //===----------------------------------------------------------------------===// #include "llvm/Target/MRegisterInfo.h" MRegisterInfo::MRegisterInfo(const MRegisterDesc *D, unsig...
//===- MRegisterInfo.cpp - Target Register Information Implementation -----===// // // This file implements the MRegisterInfo interface. // //===----------------------------------------------------------------------===// #include "llvm/Target/MRegisterInfo.h" MRegisterInfo::MRegisterInfo(const MRegisterDesc *D, unsig...
Make it easier to debug by exposing a temporary
Make it easier to debug by exposing a temporary git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@7504 91177308-0d34-0410-b5e6-96231b3b80d8
C++
apache-2.0
GPUOpen-Drivers/llvm,dslab-epfl/asap,apple/swift-llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,chubbymaggie/asap,llvm-mirror/llvm,apple/swift-llvm,apple/swift-llvm,apple/swift-llvm,chubbymaggie/asap,chubbymaggie/asap,apple/swift-llvm,dslab-epfl/asap,llvm-mirror/llvm,llvm-mirror/llvm,ap...
221b296fdcd5e2b0b800c78af3856f174540a35d
src/yarrar/io/FileSystem_android.cpp
src/yarrar/io/FileSystem_android.cpp
#include "FileSystem.h" #include "android/AndroidServices.h" #include <stdexcept> #include <fstream> #include <sstream> #include <android/log.h> namespace yarrar { namespace filesystem { void readFile(const std::string& relativePath, std::string& toBuffer) { auto assetManager = yarrar::android::getAssetManager(...
#include "FileSystem.h" #include "android/AndroidServices.h" #include <stdexcept> #include <fstream> #include <sstream> namespace { class AndroidFile { public: AndroidFile(const std::string& path): m_path(path), m_file(nullptr) { m_file = AAssetManager_open(yarrar::android::getAssetM...
Change Android file reading to RAII.
Change Android file reading to RAII.
C++
mit
ndob/yarrar,ndob/yarrar,ndob/yarrar,ndob/yarrar
8976663a4dc35852ae6dd4e2e4304ee9443869ea
PeteBrown.Devices.Midi/PeteBrown.Devices.Midi/MidiNrpnParameterValueChangeMessage.cpp
PeteBrown.Devices.Midi/PeteBrown.Devices.Midi/MidiNrpnParameterValueChangeMessage.cpp
#include "pch.h" #include "MidiNrpnParameterValueChangeMessage.h" using namespace PeteBrown::Devices::Midi; MidiNrpnParameterValueChangeMessage::MidiNrpnParameterValueChangeMessage() { _rawData = ref new Windows::Storage::Streams::Buffer(TOTAL_BYTES_IN_MESSAGE); _rawData->Length = TOTAL_BYTES_IN_MESSAGE; _rawBy...
#include "pch.h" #include "MidiNrpnParameterValueChangeMessage.h" using namespace PeteBrown::Devices::Midi; MidiNrpnParameterValueChangeMessage::MidiNrpnParameterValueChangeMessage() { _rawData = ref new Windows::Storage::Streams::Buffer(TOTAL_BYTES_IN_MESSAGE); _rawData->Length = TOTAL_BYTES_IN_MESSAGE; _rawBy...
Change message type to None
Change message type to None
C++
mit
Psychlist1972/Windows-10-MIDI-Library,Psychlist1972/Windows-10-MIDI-Library,Psychlist1972/Windows-10-MIDI-Library
7c76e6e5dfbae976bc43b4817498fbd5017fcd2a
robot-name/example.cpp
robot-name/example.cpp
#include "robot_name.h" #include <sstream> #include <stdexcept> using namespace std; namespace robot_name { namespace { string next_prefix(string prefix) { string next{prefix}; const string letters{"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"}; if (prefix[1] == letters.back()) { if (pr...
#include "robot_name.h" #include <iomanip> #include <sstream> #include <stdexcept> using namespace std; namespace robot_name { namespace { string next_prefix(string prefix) { string next{prefix}; const string letters{"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"}; if (prefix[1] == letters.back(...
Increase number of robot names that can be generated.
Increase number of robot names that can be generated.
C++
mit
patricksjackson/xcpp,exercism/xcpp,lukasz-m-maciejewski/xcpp,lukasz-m-maciejewski/xcpp,oalbe/xcpp,exercism/xcpp,oalbe/xcpp,patricksjackson/xcpp
921f06eb6fb2a3ebacc18c3612e33f23c4d327d1
cmake/checks/ffmpeg_test.cpp
cmake/checks/ffmpeg_test.cpp
#define __STDC_CONSTANT_MACROS #include <stdlib.h> extern "C" { #include <libavformat/avformat.h> #include <libavcodec/avcodec.h> #include <libswscale/swscale.h> } #define CALC_FFMPEG_VERSION(a,b,c) ( a<<16 | b<<8 | c ) static void test() { AVFormatContext* c = 0; AVCodec* avcodec = 0; AVFrame* frame = 0; #i...
#define __STDC_CONSTANT_MACROS #include <stdlib.h> extern "C" { #include <libavformat/avformat.h> #include <libavcodec/avcodec.h> #include <libswscale/swscale.h> } #define CALC_FFMPEG_VERSION(a,b,c) ( a<<16 | b<<8 | c ) static void test() { AVFormatContext* c = 0; AVCodec* avcodec = 0; AVFrame* frame = 0; (...
Fix ffmpeg detection with -D OPENCV_WARNINGS_ARE_ERRORS=ON option.
Fix ffmpeg detection with -D OPENCV_WARNINGS_ARE_ERRORS=ON option.
C++
apache-2.0
opencv/opencv,opencv/opencv,opencv/opencv,opencv/opencv,opencv/opencv,opencv/opencv,opencv/opencv,opencv/opencv,opencv/opencv,opencv/opencv
559d72a166d8c964dd9ab951c692dde747113e39
ch03/ex3_8.cpp
ch03/ex3_8.cpp
#include <iostream> #include <string> using std::string; using std::cout; using std::endl; int main() { string str("a simple string"); // while decltype(str.size()) i = 0; while (i < str.size()) str[i++] = 'X'; cout << str << endl; // for for (i = 0; i<str.size(); ++i) str[i] = 'Y'; ...
#include <iostream> #include <string> using std::string; using std::cout; using std::endl; int main() { string str("a simple string"); // while decltype(str.size()) i = 0; while (i < str.size()) str[i++] = 'X'; cout << str << endl; // for for (i = 0; i < str.size(); str[i++] = 'Y'); ...
Add the statement to expression in the FOR loop
Add the statement to expression in the FOR loop
C++
cc0-1.0
Mooophy/Cpp-Primer,Mooophy/Cpp-Primer
051350404b16e1a3ea7139d629d2fe1b2a74c4a0
examples/shaderExample/src/shaderImageMask.cpp
examples/shaderExample/src/shaderImageMask.cpp
// // shaderImageMask.cpp // shaderExample // // Created by Alex Olivier on 6/6/14. // // This example shows how to pass multiple textures // to a shader. It uses one texture as a mask. // Based on openFrameworks shader tutorials #include "shaderImageMask.h" shaderImageMask::shaderImageMask(string iFilename1,...
// // shaderImageMask.cpp // shaderExample // // Created by Alex Olivier on 6/6/14. // // This example shows how to pass multiple textures // to a shader. It uses one texture as a mask. // Based on openFrameworks shader tutorials #include "shaderImageMask.h" shaderImageMask::shaderImageMask(string iFilename1,...
Use getTexture method to access image tex
Use getTexture method to access image tex
C++
mit
sosolimited/ofxSoso,sosolimited/ofxSoso
3fedae61e503052ad3ab0dcaf37330a210f85765
source/raytracer.cpp
source/raytracer.cpp
#include <thread> #include <renderer.hpp> #include <fensterchen.hpp> int main(int argc, char* argv[]) { unsigned const width = 800; unsigned const height = 600; std::string const filename = "./checkerboard.ppm"; Renderer app(width, height, filename); std::thread thr([&app]() { app.render(); }); Window w...
#include <thread> #include <renderer.hpp> #include <fensterchen.hpp> int main(int argc, char* argv[]) { unsigned const width = 600; unsigned const height = 600; std::string const filename = "./checkerboard.ppm"; Renderer app(width, height, filename); std::thread thr([&app]() { app.render(); }); Window w...
Set window size to 600x600.
Set window size to 600x600.
C++
mit
der-freddy/programmiersprachen-raytracer,TheChosenHobbit/programmiersprachen-raytracer,ChrisQuinto/programmiersprachen-raytracer,TheChosenHobbit/programmiersprachen-raytracer,Graunarmin/programmiersprachen-raytracer,vrsys/programmiersprachen-raytracer,piza2416/programmiersprachen-raytracer,BSVogler/Raytracer,Jojooo0o/p...
7fb97d43d50fc0fd511bb5a2c712d02bd9086cb3
recipes/thermofun/test/main.cpp
recipes/thermofun/test/main.cpp
// ThermoFun includes #include <Thermofun/ThermoFun.hpp> using namespace ThermoFun; int main() { Database db("aq17.json"); }
// ThermoFun includes #include <ThermoFun/ThermoFun.hpp> using namespace ThermoFun; int main() { Database db("aq17.json"); }
Fix include header statement of test
Fix include header statement of test
C++
bsd-3-clause
ReimarBauer/staged-recipes,patricksnape/staged-recipes,goanpeca/staged-recipes,hadim/staged-recipes,mcs07/staged-recipes,scopatz/staged-recipes,patricksnape/staged-recipes,ocefpaf/staged-recipes,Juanlu001/staged-recipes,cpaulik/staged-recipes,kwilcox/staged-recipes,johanneskoester/staged-recipes,mariusvniekerk/staged-r...
48e8d271a72b584c499c795b62a32e0331b8330d
src/game/stats.cpp
src/game/stats.cpp
/* Copyright 2014 Dietrich Epp. This file is part of Oubliette. Oubliette is licensed under the terms of the 2-clause BSD license. For more information, see LICENSE.txt. */ #include "stats.hpp" namespace game { const walking_stats stats::player = { 600.0f, // Walking 1200.0f, 120.0f, 300.0f, 150.0f...
/* Copyright 2014 Dietrich Epp. This file is part of Oubliette. Oubliette is licensed under the terms of the 2-clause BSD license. For more information, see LICENSE.txt. */ #include "stats.hpp" namespace game { const walking_stats stats::player = { 600.0f, // Walking 1200.0f, 120.0f, 300.0f, 150.0f...
Improve ability to make small jumps
Improve ability to make small jumps
C++
bsd-2-clause
depp/oubliette,depp/oubliette,depp/oubliette,depp/oubliette
b90077ca79f8f94a6fd33306309d32867f5c67fd
packages/Python/lldbsuite/test/functionalities/non-overlapping-index-variable-i/main.cpp
packages/Python/lldbsuite/test/functionalities/non-overlapping-index-variable-i/main.cpp
//===-- main.cpp ------------------------------------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===-------------------------------------------------------...
//===-- main.cpp ------------------------------------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===-------------------------------------------------------...
Fix a test that never compiled under -fmodules
[test] Fix a test that never compiled under -fmodules This test #include's stdio.h, which, on at least two bots results in a module import of MacTypes.h (due to weird SDK layering issues), which causes the test to fail to compile. Just don't #include stdio.h, as it's not needed for the test. git-svn-id: 4c4cc70b1ef4...
C++
apache-2.0
apple/swift-lldb,apple/swift-lldb,apple/swift-lldb,apple/swift-lldb,apple/swift-lldb,apple/swift-lldb
e351e9e0b25aea35cd8863e51e7cc24d6973158d
examples/ex1/main.cpp
examples/ex1/main.cpp
#include <iostream> #include "../../rltk/rltk.hpp" #include <sstream> bool tick(double duration_ms) { auto res = rltk::get_screen_size_px(); std::stringstream ss; ss << "Frame duration: " << duration_ms << " ms. Resolution: " << res.first << "x" << res.second; rltk::cls_root(); rltk::print_to_root(1, 1, ss.str())...
#include <iostream> #include "../../rltk/rltk.hpp" #include <sstream> bool tick(double duration_ms) { auto res = rltk::get_screen_size_px(); std::stringstream ss; ss << "Frame duration: " << duration_ms << " ms (" << (1000.0/duration_ms) << " FPS). Resolution: " << res.first << "x" << res.second; rltk::cls_root();...
Add simple FPS display to example.
Add simple FPS display to example.
C++
mit
thebracket/rltk
80bcfa10393f9c55f3481b561e29ac1d8d0bfee8
src/mv_text.cc
src/mv_text.cc
#include <boost/optional.hpp> #include "move.hh" #include "../../../src/contents.hh" namespace vick { namespace move { boost::optional< std::shared_ptr<change> > mvsot(contents& contents, boost::optional<int>) { contents.waiting_for_desired = false; contents.x = 0; for(auto x : contents.cont[contents.y])...
#include <boost/optional.hpp> #include "move.hh" #include "../../../src/contents.hh" namespace vick { namespace move { boost::optional< std::shared_ptr<change> > mvsot(contents& contents, boost::optional<int>) { contents.waiting_for_desired = false; contents.x = 0; for(auto c : contents.cont[contents.y])...
Use iterator var for character as `c` instead of confusing `x` (using `contents.x` as well)
Use iterator var for character as `c` instead of confusing `x` (using `contents.x` as well)
C++
mpl-2.0
czipperz/vick-move
a01588d9366ca4af506becb0e91816ebed5bab74
src/main.cc
src/main.cc
#include "nslog.h" #include <node.h> using namespace v8; namespace { Handle<Value> Log(const Arguments& args) { String::Utf8Value utf8_string(Local<String>::Cast(args[0])); nslog::Log(*utf8_string); return Undefined(); } void Init(Handle<Object> exports) { NODE_SET_METHOD(exports, "log", Log); } } // name...
#include "nslog.h" #include "nan.h" using namespace v8; namespace { NAN_METHOD(Log) { NanScope(); String::Utf8Value utf8_string(Local<String>::Cast(args[0])); nslog::Log(*utf8_string); NanReturnUndefined(); } void Init(Handle<Object> exports) { NODE_SET_METHOD(exports, "log", Log); } } // namespace N...
Use nan to wrap around V8 functions.
Use nan to wrap around V8 functions.
C++
mit
dustinblackman/node-nslog,atom/node-nslog,oligot/node-nslog,atom/node-nslog,dustinblackman/node-nslog,oligot/node-nslog
880e0a5943b61977a9125f04a63d5e097892807a
src/logger.cpp
src/logger.cpp
#include "logger.h" Logger g_logger; //------------------------------------------------------------------------------ LogViewer::LogViewer(QWidget* parent) : QPlainTextEdit(parent) { } void LogViewer::connectLogger(Logger* logger) { connect(logger, SIGNAL(logMessage(int, QString)), this, SLOT(a...
#include "logger.h" Logger g_logger; //------------------------------------------------------------------------------ LogViewer::LogViewer(QWidget* parent) : QPlainTextEdit(parent) { } void LogViewer::connectLogger(Logger* logger) { connect(logger, SIGNAL(logMessage(int, QString)), this, SLOT(a...
Fix logging highlighting, visibility, and newlines
Fix logging highlighting, visibility, and newlines Avoid logging plain text messages using appendHtml(), otherwise newlines will be stripped, and tags interpreted. Also ensure that the cursor is at the end of the log text to ensure the latest log statement is always visible, and the wrong highlighting isn't inherited...
C++
bsd-3-clause
JoshChristie/displaz,rotorliu/displaz,JoshChristie/displaz,rotorliu/displaz,rotorliu/displaz,rotorliu/displaz,JoshChristie/displaz,JoshChristie/displaz,JoshChristie/displaz
013035159f4ecf9334110b8a3bcab8f1569543b5
game/state/rules/city/vammotype.cpp
game/state/rules/city/vammotype.cpp
#include "game/state/rules/city/vammotype.h" #include "game/state/gamestate.h" namespace OpenApoc { const UString &VAmmoType::getPrefix() { static UString prefix = "VAMMOTYPE_"; return prefix; } const UString &VAmmoType::getTypeName() { static UString name = "VAmmoType"; return name; } sp<VAmmoType> VAmmoType::...
#include "game/state/rules/city/vammotype.h" #include "game/state/gamestate.h" namespace OpenApoc { const UString &VAmmoType::getPrefix() { static UString prefix = "VEQUIPMENTAMMOTYPE_"; return prefix; } const UString &VAmmoType::getTypeName() { static UString name = "VAmmoType"; return name; } sp<VAmmoType> VA...
Revert "Revert "Vehicle ammo prefix VAMMOTYPE_ to VEQUIPMENTAMMOTYPE_""
Revert "Revert "Vehicle ammo prefix VAMMOTYPE_ to VEQUIPMENTAMMOTYPE_"" This reverts commit 9a77e12c4e6ceabdef5ba79b01c440bc005f4960.
C++
mit
Istrebitel/OpenApoc,FranciscoDA/OpenApoc,FranciscoDA/OpenApoc,Istrebitel/OpenApoc,pmprog/OpenApoc,steveschnepp/OpenApoc,pmprog/OpenApoc,steveschnepp/OpenApoc,FranciscoDA/OpenApoc
b9e0419e938d340250be1c68ef67ec30b46994bf
src/driver/servo_krs/src/servo_krs_node.cpp
src/driver/servo_krs/src/servo_krs_node.cpp
#include<ros/ros.h> #include<servo_msgs/IdBased.h> #include<ics3/ics> ics::ICS3* driver {nullptr}; ros::Publisher pub; void move(const servo_msgs::IdBased::ConstPtr& msg) { servo_msgs::IdBased result; try { auto&& now_pos = driver->move(msg->id, ics::Angle::newDegree(msg->angle)); result.angle = std::move...
#include<ros/ros.h> #include<servo_msgs/IdBased.h> #include<ics3/ics> ics::ICS3* driver {nullptr}; ros::Publisher pub; void move(const servo_msgs::IdBased::ConstPtr& msg) { servo_msgs::IdBased result; try { auto now_pos = driver->move(msg->id, ics::Angle::newRadian(msg->angle)); result.angle = std::move(n...
Update with convert unit to radian
Update with convert unit to radian
C++
mit
agrirobo/arcsys2,agrirobo/arcsys2
5042e6c67946d87e0926051b779f2b8fc365929c
libspaghetti/nodes/ui/float_info.cc
libspaghetti/nodes/ui/float_info.cc
#include "nodes/ui/float_info.h" #include "elements/ui/float_info.h" #include <QTableWidget> #include <QGraphicsSimpleTextItem> namespace nodes::ui { FloatInfo::FloatInfo() { QFont font{}; font.setPixelSize(32); auto widget = new QGraphicsSimpleTextItem("0.0"); widget->setFont(font); QPointF widgetPositio...
#include "nodes/ui/float_info.h" #include "elements/ui/float_info.h" #include <QTableWidget> #include <QGraphicsSimpleTextItem> namespace nodes::ui { FloatInfo::FloatInfo() { QFont font{}; font.setPixelSize(32); auto widget = new QGraphicsSimpleTextItem("0.0"); widget->setFont(font); QPointF widgetPositio...
Set float precision to 2 in FloatInfo
Set float precision to 2 in FloatInfo
C++
mit
aljen/spaghetti,aljen/spaghetti
f0f929665e0e2497bed27b2d7300973c4122bb96
src/platform/qt/GBAApp.cpp
src/platform/qt/GBAApp.cpp
/* Copyright (c) 2013-2014 Jeffrey Pfau * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "GBAApp.h" #include "GameController.h" #include <QFileOpenEve...
/* Copyright (c) 2013-2014 Jeffrey Pfau * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "GBAApp.h" #include "GameController.h" #include <QFileOpenEve...
Fix window geometry on launch when window is still hidden
Qt: Fix window geometry on launch when window is still hidden
C++
mpl-2.0
fr500/mgba,sergiobenrocha2/mgba,libretro/mgba,askotx/mgba,iracigt/mgba,cassos/mgba,Touched/mgba,jeremyherbert/mgba,sergiobenrocha2/mgba,Iniquitatis/mgba,MerryMage/mgba,jeremyherbert/mgba,mgba-emu/mgba,libretro/mgba,libretro/mgba,fr500/mgba,Touched/mgba,AdmiralCurtiss/mgba,sergiobenrocha2/mgba,zerofalcon/mgba,mgba-emu/m...
91220d104379729e1fa9e2335c278d3aea3ebc62
test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/mutex_adopt_lock.pass.cpp
test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/mutex_adopt_lock.pass.cpp
//===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure // // This file is dual licensed under the MIT and the University of Illinois Open // Source Licenses. See LICENSE.TXT for details. // //===----------------------------------------...
//===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure // // This file is dual licensed under the MIT and the University of Illinois Open // Source Licenses. See LICENSE.TXT for details. // //===----------------------------------------...
Fix PR23041. Use lock_shared() as opposed to lock() in shared_lock test.
Fix PR23041. Use lock_shared() as opposed to lock() in shared_lock test. git-svn-id: 756ef344af921d95d562d9e9f9389127a89a6314@233367 91177308-0d34-0410-b5e6-96231b3b80d8
C++
apache-2.0
llvm-mirror/libcxx,llvm-mirror/libcxx,llvm-mirror/libcxx,llvm-mirror/libcxx,llvm-mirror/libcxx
1df7e3ba8da59c6d68fc75b2ea4fb84a2d8820c0
src/initiation/transaction/sipnondialogclient.cpp
src/initiation/transaction/sipnondialogclient.cpp
#include "sipnondialogclient.h" #include <QDebug> SIPNonDialogClient::SIPNonDialogClient(SIPTransactionUser *tu): SIPClientTransaction (tu) {} void SIPNonDialogClient::set_remoteURI(SIP_URI& uri) { remoteUri_ = uri; } void SIPNonDialogClient::getRequestMessageInfo(RequestType type, ...
#include "sipnondialogclient.h" #include <QDebug> SIPNonDialogClient::SIPNonDialogClient(SIPTransactionUser *tu): SIPClientTransaction (tu) {} void SIPNonDialogClient::set_remoteURI(SIP_URI& uri) { remoteUri_ = uri; } void SIPNonDialogClient::getRequestMessageInfo(RequestType type, ...
Send alias and rport parameters to proxy.
feature(Transaction): Send alias and rport parameters to proxy.
C++
isc
ultravideo/kvazzup,ultravideo/kvazzup
e1788479de87ee9e28de3d88ba055183e070dbcc
webkit/glue/webview_unittest.cc
webkit/glue/webview_unittest.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 "testing/gtest/include/gtest/gtest.h" #include "third_party/WebKit/WebKit/chromium/public/WebView.h" #include "webkit/tools/test_shell/t...
// 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 "testing/gtest/include/gtest/gtest.h" #include "third_party/WebKit/WebKit/chromium/public/WebView.h" #include "webkit/tools/test_shell/t...
Rename unit test: WebViewTest.GetContentAsPlainText -> WebViewTest.ActiveState.
Rename unit test: WebViewTest.GetContentAsPlainText -> WebViewTest.ActiveState. I'm responsible for misnaming it in the first place (cut-and-paste error). Oops. BUG=23501 TEST=none Review URL: http://codereview.chromium.org/414034 git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@32612 0039d316-1c4b-4281-b951-d8...
C++
bsd-3-clause
gavinp/chromium,ropik/chromium,gavinp/chromium,yitian134/chromium,Crystalnix/house-of-life-chromium,Crystalnix/house-of-life-chromium,yitian134/chromium,ropik/chromium,adobe/chromium,ropik/chromium,ropik/chromium,yitian134/chromium,yitian134/chromium,gavinp/chromium,adobe/chromium,adobe/chromium,gavinp/chromium,Crystal...
1700c4b727e0e0490afb974f44e95a5f211f2e51
cantranslator/bitfield.cpp
cantranslator/bitfield.cpp
#include "bitfield.h" unsigned long getBitField(uint8_t* data, int start_bit, int num_bits) { unsigned long ret = 0; int start_byte = start_bit / 8; if (num_bits <= 8 ) { // Bit fields are positioned according to big-endian bit layout, but // inside the bit field, values are represented as little-e...
#include "bitfield.h" unsigned long getBitField(uint8_t* data, int startBit, int numBits) { unsigned long ret = 0; int startByte = startBit / 8; if (numBits <= 8 ) { // Bit fields are positioned according to big-endian bit layout, but // inside the bit field, values are represented as little-endian...
Revert naming change - we're using camelCase everywhere else.
Revert naming change - we're using camelCase everywhere else.
C++
bsd-3-clause
openxc/vi-firmware,ene-ilies/vi-firmware,ene-ilies/vi-firmware,openxc/vi-firmware,openxc/vi-firmware,openxc/vi-firmware,ene-ilies/vi-firmware,ene-ilies/vi-firmware,mgiannikouris/vi-firmware,mgiannikouris/vi-firmware,mgiannikouris/vi-firmware,mgiannikouris/vi-firmware
e3c6d571cdcffcbdaacd9cc23c977b1098995b10
Sources/Rosetta/Enchants/Enchant.cpp
Sources/Rosetta/Enchants/Enchant.cpp
// Copyright (c) 2019 Chris Ohk, Youngjoong Kim, SeungHyun Jeon // We are making my contributions/submissions to this project solely in our // personal capacity and are not conveying any rights to any intellectual // property of any third parties. #include <Rosetta/Enchants/Enchant.hpp> namespace RosettaStone { Ench...
// Copyright (c) 2019 Chris Ohk, Youngjoong Kim, SeungHyun Jeon // We are making my contributions/submissions to this project solely in our // personal capacity and are not conveying any rights to any intellectual // property of any third parties. #include <Rosetta/Enchants/Enchant.hpp> namespace RosettaStone { Ench...
Correct argument name of constructor (effects -> _effects)
fix: Correct argument name of constructor (effects -> _effects)
C++
mit
Hearthstonepp/Hearthstonepp,Hearthstonepp/Hearthstonepp
300f0fd7dc519557ff0ff6242cb82db20b792842
cpp/example.cpp
cpp/example.cpp
/** * @file example.cpp * @author Marcus Edel * * Simple random agent. */ #include <iostream> #include "environment.hpp" using namespace gym; int main(int argc, char* argv[]) { const std::string environment = "CartPole-v0"; const std::string host = "127.0.0.1"; const std::string port = "4040"; double ...
/** * @file example.cpp * @author Marcus Edel * * Simple random agent. */ #include <iostream> #include "environment.hpp" using namespace gym; int main(int argc, char* argv[]) { const std::string environment = "SpaceInvaders-v0"; const std::string host = "kurg.org"; const std::string port = "4040"; dou...
Use demo server as default and record performance.
Use demo server as default and record performance.
C++
bsd-3-clause
zoq/gym_tcp_api,zoq/gym_tcp_api
c4fe10aad04b41d24d2d8700b63c6ae1fce88c2c
chrome/browser/locale_tests_uitest.cc
chrome/browser/locale_tests_uitest.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 "chrome/test/ui/ui_test.h" class LocaleTestsDa : public UITest { public: LocaleTestsDa() : UITest() { launch_arguments_.AppendSw...
// 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 "chrome/test/ui/ui_test.h" class LocaleTestsDa : public UITest { public: LocaleTestsDa() : UITest() { launch_arguments_.AppendSw...
Change zh-tw to zh-TW when it's used to find the locale data pack on Linux (case-sensitive file system).
Change zh-tw to zh-TW when it's used to find the locale data pack on Linux (case-sensitive file system). BUG=8647 TEST=Pass ui test on Linux TBR=tony Review URL: http://codereview.chromium.org/146117 git-svn-id: http://src.chromium.org/svn/trunk/src@19197 4ff67af0-8c30-449e-8e8b-ad334ec8d88c Former-commit-id: 8d555...
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...
4cb32485ce16bbfb356b43611529ee1353d66d6c
test/functionalities/data-formatter/rdar-13338477/main.cpp
test/functionalities/data-formatter/rdar-13338477/main.cpp
//===-- main.cpp ------------------------------------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===-------------------------------------------------------...
//===-- main.cpp ------------------------------------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===-------------------------------------------------------...
Fix rdar-13338477 test-case for Linux. - Using __builtin_trap confuses the stack unwinder - __builtin_trap specific test will be added shortly
Fix rdar-13338477 test-case for Linux. - Using __builtin_trap confuses the stack unwinder - __builtin_trap specific test will be added shortly git-svn-id: 4c4cc70b1ef44ba2b7963015e681894188cea27e@181441 91177308-0d34-0410-b5e6-96231b3b80d8
C++
apache-2.0
apple/swift-lldb,apple/swift-lldb,llvm-mirror/lldb,llvm-mirror/lldb,apple/swift-lldb,apple/swift-lldb,apple/swift-lldb,llvm-mirror/lldb,llvm-mirror/lldb,apple/swift-lldb,llvm-mirror/lldb
ff2c251ea356b3557c5feeb6eb22b1b3ce565049
test/remove-cstr-calls/basic.cpp
test/remove-cstr-calls/basic.cpp
// RUN: grep -Ev "// *[A-Z-]+:" %s > %t.cpp // RUN: remove-cstr-calls . %t.cpp -- // RUN: FileCheck -input-file=%t.cpp %s // REQUIRES: shell namespace std { template<typename T> class allocator {}; template<typename T> class char_traits {}; template<typename C, typename T, typename A> struct basic_string { basic_str...
// RUN: grep -Ev "// *[A-Z-]+:" %s > %t.cpp // RUN: remove-cstr-calls . %t.cpp -- // RUN: FileCheck -input-file=%t.cpp %s // REQUIRES: shell namespace std { template<typename T> class allocator {}; template<typename T> class char_traits {}; template<typename C, typename T, typename A> struct basic_string { basic_str...
Fix a remove-cstr-calls test that fails checking of the produced code.
Fix a remove-cstr-calls test that fails checking of the produced code. git-svn-id: a34e9779ed74578ad5922b3306b3d80a0c825546@184314 91177308-0d34-0410-b5e6-96231b3b80d8
C++
apache-2.0
llvm-mirror/clang-tools-extra,llvm-mirror/clang-tools-extra,llvm-mirror/clang-tools-extra,llvm-mirror/clang-tools-extra
c3ce51afb36b1a7d5aaa08b4dc32e9d14a63b913
ppapi/proxy/ppapi_messages.cc
ppapi/proxy/ppapi_messages.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 "ppapi/proxy/ppapi_messages.h" #include "base/file_path.h" #include "ipc/ipc_channel_handle.h" #include "ppapi/c/dev/pp_file_info_dev.h" #in...
// 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 "ppapi/proxy/ppapi_messages.h" #include "base/file_path.h" #include "ipc/ipc_channel_handle.h" #include "ppapi/c/dev/pp_file_info_dev.h" #in...
Add a blank line to force this file to be recompiled on Mac on the bots.
Add a blank line to force this file to be recompiled on Mac on the bots. git-svn-id: http://src.chromium.org/svn/trunk/src@65997 4ff67af0-8c30-449e-8e8b-ad334ec8d88c Former-commit-id: 30212b62da779717dbf5b35a8bd0a4fdbf930d27
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...
ed3f98ceebb434c694e049cad22356d09bd3a540
examples/Tut00/main.cpp
examples/Tut00/main.cpp
#include <Nazara/Audio.hpp> #include <Nazara/Core.hpp> #include <Nazara/Graphics.hpp> #include <Nazara/Lua.hpp> #include <Nazara/Network.hpp> #include <Nazara/Noise.hpp> #include <Nazara/Physics.hpp> #include <Nazara/Renderer.hpp> #include <Nazara/Utility.hpp> #include <NDK/Application.hpp> #include <iostream> int ma...
#include <Nazara/Audio.hpp> #include <Nazara/Core.hpp> #include <Nazara/Graphics.hpp> #include <Nazara/Lua.hpp> #include <Nazara/Network.hpp> #include <Nazara/Noise.hpp> #include <Nazara/Physics2D.hpp> #include <Nazara/Physics3D.hpp> #include <Nazara/Renderer.hpp> #include <Nazara/Utility.hpp> #include <NDK/Applicatio...
Fix compilation of Tut00 after Physics change
Example: Fix compilation of Tut00 after Physics change
C++
mit
DigitalPulseSoftware/NazaraEngine
ae36dec159a005b97edb95589438c4ff3886dc2a
test/Analysis/osobjectcstylecastchecker_test.cpp
test/Analysis/osobjectcstylecastchecker_test.cpp
// RUN: %clang_analyze_cc1 -analyzer-checker=optin.osx.OSObjectCStyleCast %s -verify #include "os_object_base.h" struct OSArray : public OSObject { unsigned getCount(); }; struct A { int x; }; struct B : public A { unsigned getCount(); }; unsigned warn_on_explicit_downcast(OSObject * obj) { OSArray *a = (OSA...
// RUN: %clang_analyze_cc1 -analyzer-checker=optin.osx.OSObjectCStyleCast %s -verify #include "os_object_base.h" struct OSArray : public OSObject { unsigned getCount(); }; struct A { int x; }; struct B : public A { unsigned getCount(); }; unsigned warn_on_explicit_downcast(OSObject * obj) { OSArray *a = (OSA...
Fix test to pass on LLP64 targets
Fix test to pass on LLP64 targets git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@353654 91177308-0d34-0410-b5e6-96231b3b80d8
C++
apache-2.0
llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/cl...
5ae42226e5b4b9262421b0252376cfc8b64e8532
engine/graphics/RenderTarget.cpp
engine/graphics/RenderTarget.cpp
// Ouzel by Elviss Strazdins #include "RenderTarget.hpp" #include "Graphics.hpp" #include "Texture.hpp" namespace ouzel::graphics { RenderTarget::RenderTarget(Graphics& initGraphics, const std::vector<Texture*>& initColorTextures, Texture* initDepthTex...
// Ouzel by Elviss Strazdins #include "RenderTarget.hpp" #include "Graphics.hpp" #include "Texture.hpp" namespace ouzel::graphics { RenderTarget::RenderTarget(Graphics& initGraphics, const std::vector<Texture*>& initColorTextures, Texture* initDepthTex...
Use ResourceId instead of size_t
Use ResourceId instead of size_t
C++
unlicense
elnormous/ouzel,elnormous/ouzel,elnormous/ouzel
10ac88f35a12c2202c395d982972ff9e38236092
grune-yaml/samples/main.cpp
grune-yaml/samples/main.cpp
#include "grune/grammars/anbncn.hpp" #include "grune/grammars/turtle.hpp" #include "grune/grammars/tom_dick_and_harry.hpp" #include "grune-yaml/grune-yaml.hpp" #include <fstream> #define MAKE_SAMPLE(name) \ do { \ std::ofstream out(#name ".yaml"); \ out << YAML::Node(grune::grammars::name()) << st...
#include "grune/grammars/anbncn.hpp" #include "grune/grammars/turtle.hpp" #include "grune/grammars/tom_dick_and_harry.hpp" #include "grune-yaml/grune-yaml.hpp" #include <fstream> #define MAKE_SAMPLE_IMPL(name) \ do { \ std::ofstream out(#name ".yaml"); \ out << YAML::Node(grune::grammars::name()) ...
Add test separation for YAML make-samples
Add test separation for YAML make-samples
C++
mit
Fifty-Nine/grune
42ce6cbf37f1d2bfb849a607981622dde3208ba2
test/CodeGenCXX/decl-ref-init.cpp
test/CodeGenCXX/decl-ref-init.cpp
// REQUIRES: x86-registered-target,x86-64-registered-target // RUN: %clang_cc1 -triple x86_64-apple-darwin -S %s -o %t-64.s // RUN: FileCheck -check-prefix CHECK-LP64 --input-file=%t-64.s %s // RUN: %clang_cc1 -triple i386-apple-darwin -S %s -o %t-32.s // RUN: FileCheck -check-prefix CHECK-LP32 --input-file=%t-32.s %s ...
// RUN: %clang_cc1 -triple x86_64-apple-darwin -emit-llvm %s -o - | \ // RUN: FileCheck %s // RUN: %clang_cc1 -triple i386-apple-darwin -emit-llvm %s -o - | \ // RUN: FileCheck %s struct A {}; struct B { operator A&(); }; struct D : public B { operator A(); }; extern B f(); extern D d(); int main() { co...
Check IR on this test.
Check IR on this test. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@196284 91177308-0d34-0410-b5e6-96231b3b80d8
C++
apache-2.0
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,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-cl...
aa55de6e4f0a67240e41dedb3b63e2a2bffb2257
source/main.cpp
source/main.cpp
#include <iostream> #include <string> #include <vector> #include "Window.h" #include "ProceduralRenderer.h" #include <glbinding/gl/gl.h> #include <glbinding/Binding.h> using namespace gl; int main() { Window w; w.init("procedural"); glbinding::Binding::initialize(); std::cout << "OpenGL Version: " ...
#include <iostream> #include <string> #include <vector> #include <map> #include <sstream> #include "Window.h" #include "ProceduralRenderer.h" #include <glbinding/gl/gl.h> #include <glbinding/Binding.h> using namespace gl; std::map<std::string, std::string> parseArguments(int argc, char * argv[]) { std::vector<s...
Add argument for requesting specific OpenGl version
Add argument for requesting specific OpenGl version
C++
mit
simonkrogmann/procedural,simonkrogmann/procedural
b73e75cfda58c89e6cb196668409daa3c7e45d7f
test/SemaCXX/namespace-alias.cpp
test/SemaCXX/namespace-alias.cpp
// RUN: clang-cc -fsyntax-only -verify %s namespace N { }; namespace A = N; int B; // expected-note {{previous definition is here}} namespace B = N; // expected-error {{redefinition of 'B' as different kind of symbol}} namespace C { } // expected-note {{previous definition is here}} namespace C = N; // expected-err...
// RUN: clang-cc -fsyntax-only -verify %s namespace N { }; namespace A = N; int B; // expected-note {{previous definition is here}} namespace B = N; // expected-error {{redefinition of 'B' as different kind of symbol}} namespace C { } // expected-note {{previous definition is here}} namespace C = N; // expected-err...
Check in test for namespace aliases+using directives.
Check in test for namespace aliases+using directives. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@68086 91177308-0d34-0410-b5e6-96231b3b80d8
C++
apache-2.0
apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-cl...
e9d666c9cf225227f986df3de9efb010c7bb5d0a
src/algotdd/test/test_list.cc
src/algotdd/test/test_list.cc
#include "list.h" #include "gtest/gtest.h" #include <string> class listTest : public testing::Test { protected: virtual void SetUp() { // NOT YET IMPLEMENTED } virtual void TearDown() {} // setup fixtures list<int> list_1; list<int> list_2; list<std::string> list_str; }; TEST(listNodeTest, DefaultC...
#include "list.h" #include "gtest/gtest.h" #include <string> class listTest : public testing::Test { protected: virtual void SetUp() { // NOT YET IMPLEMENTED } virtual void TearDown() {} // setup fixtures list<int> list_1; list<int> list_2; list<std::string> list_str; }; // test the helper class li...
Add more documentation for listNodeTest
list: Add more documentation for listNodeTest
C++
mit
nguyentu1602/algorithm-tdd,nguyentu1602/algorithm-tdd,nguyentu1602/algorithm-tdd
bd60691d95809491ddf10205e1c9d9762709f58f
test/core/slice/b64_encode_fuzzer.cc
test/core/slice/b64_encode_fuzzer.cc
/* * * Copyright 2019 gRPC authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agree...
/* * * Copyright 2019 gRPC authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agree...
Fix include order for clang_format.
Fix include order for clang_format.
C++
apache-2.0
muxi/grpc,donnadionne/grpc,jtattermusch/grpc,firebase/grpc,stanley-cheung/grpc,muxi/grpc,jboeuf/grpc,jtattermusch/grpc,vjpai/grpc,ctiller/grpc,muxi/grpc,jboeuf/grpc,ejona86/grpc,muxi/grpc,stanley-cheung/grpc,nicolasnoble/grpc,nicolasnoble/grpc,firebase/grpc,grpc/grpc,grpc/grpc,vjpai/grpc,grpc/grpc,stanley-cheung/grpc,v...
c6dbee826663e3d2c0adeac1378121517609e843
NXTAndroidClientNew/NXTClient/components/parser/jsonparser.cpp
NXTAndroidClientNew/NXTClient/components/parser/jsonparser.cpp
#include "jsonparser.h" JSONParser::JSONParser(QObject *parent) : QObject(parent) { clearData(); } void JSONParser::clearData() { p_data = "{ "; } void JSONParser::addVariable(const QString name, int value) { p_data.append("\""); p_data.append(name); p_data.append("\":"); p_data.append(QS...
#include "jsonparser.h" JSONParser::JSONParser(QObject *parent) : QObject(parent) { clearData(); } void JSONParser::clearData() { p_data = "{ "; } void JSONParser::addVariable(const QString name, int value) { p_data.append("\""); p_data.append(name); p_data.append("\":"); p_data.append(QS...
Fix C++: getter changed data - JSONPARSER
Fix C++: getter changed data - JSONPARSER
C++
lgpl-2.1
spseol/DOD-2014,spseol/DOD-2014,spseol/DOD-2014
405577477d95090fd488662c51a7eb46701abf09
util/devel/coverity/coverity_model.cpp
util/devel/coverity/coverity_model.cpp
/** * Coverity Scan model * * Manage false positives by giving coverity some hints. * * Updates to this file must be manually submitted by an admin to: * * https://scan.coverity.com/projects/1222 * */ // When tag is 1 or 2, let coverity know that execution is halting. Those // tags correspond to INT_FATAL a...
/** * Coverity Scan model * * Manage false positives by giving coverity some hints. * * Updates to this file must be manually submitted by an admin to: * * https://scan.coverity.com/projects/1222 * */ // When tag is 1 or 2, let coverity know that execution is halting. Those // tags correspond to INT_FATAL a...
Fix unrecognized types in Coverity Scan model chpl_*error() decls.
Fix unrecognized types in Coverity Scan model chpl_*error() decls.
C++
apache-2.0
CoryMcCartan/chapel,CoryMcCartan/chapel,chizarlicious/chapel,hildeth/chapel,CoryMcCartan/chapel,chizarlicious/chapel,chizarlicious/chapel,hildeth/chapel,hildeth/chapel,chizarlicious/chapel,CoryMcCartan/chapel,chizarlicious/chapel,chizarlicious/chapel,CoryMcCartan/chapel,chizarlicious/chapel,hildeth/chapel,CoryMcCartan/...
9ada570e77bdd8334a86528b07e5569d00750b3c
test/CXX/temp/temp.spec/temp.explicit/p1-emit.cpp
test/CXX/temp/temp.spec/temp.explicit/p1-emit.cpp
// RUN: clang-cc -emit-llvm -triple x86_64-apple-darwin10 -o - %s | FileCheck %s template<typename T> struct X { static T member1; static T member2; static T member3; }; template<typename T> T X<T>::member1; template<typename T> T X<T>::member2 = 17; // CHECK: @_ZN1XIiE7member1E = global i32 0 template int X<i...
// RUN: clang-cc -emit-llvm -triple x86_64-apple-darwin10 -o - %s | FileCheck %s template<typename T> struct X { static T member1; static T member2; static T member3; }; template<typename T> T X<T>::member1; template<typename T> T X<T>::member2 = 17; // CHECK: @_ZN1XIiE7member1E = global i32 0 template int X<i...
Check the implicit instantiation of a static data member of a class template that has no out-of-line definition.
Check the implicit instantiation of a static data member of a class template that has no out-of-line definition. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@84141 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,apple/swift-clang,apple/swift-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,llvm-mirror/cl...
f21e958920c938b734010bc1fd1eb5ae9ccf12ce
caffe2/operators/scale_op.cc
caffe2/operators/scale_op.cc
#include "caffe2/operators/scale_op.h" namespace caffe2 { REGISTER_CPU_OPERATOR(Scale, ScaleOp<float, CPUContext>); OPERATOR_SCHEMA(Scale) .NumInputs(1) .NumOutputs(1) .AllowInplace({{0, 0}}) .SetDoc(R"DOC( Scale takes one input data (Tensor<float>) and produces one output data (Tensor<float>) whose value is ...
#include "caffe2/operators/scale_op.h" namespace caffe2 { REGISTER_CPU_OPERATOR(Scale, ScaleOp<float, CPUContext>); OPERATOR_SCHEMA(Scale) .NumInputs(1) .NumOutputs(1) .AllowInplace({{0, 0}}) .SetDoc(R"DOC( Scale takes one input data (Tensor<float>) and produces one output data (Tensor<float>) whose value is ...
Fix warning in ScaleOp grad
Fix warning in ScaleOp grad Summary: #accept2ship Reviewed By: Yangqing Differential Revision: D4386362 fbshipit-source-id: 634410e73034ac31b7f2bec39f41c52ea9935e3a
C++
apache-2.0
bwasti/caffe2,xzturn/caffe2,Yangqing/caffe2,bwasti/caffe2,bwasti/caffe2,sf-wind/caffe2,xzturn/caffe2,davinwang/caffe2,davinwang/caffe2,davinwang/caffe2,xzturn/caffe2,xzturn/caffe2,pietern/caffe2,Yangqing/caffe2,xzturn/caffe2,pietern/caffe2,davinwang/caffe2,sf-wind/caffe2,caffe2/caffe2,pietern/caffe2,bwasti/caffe2,davin...
342f4497e887478cf7b2ce62a157ae9d993f5abd
MyGUIEngine/src/MyGUI_ControllerRepeatClick.cpp
MyGUIEngine/src/MyGUI_ControllerRepeatClick.cpp
/* * This source file is part of MyGUI. For the latest info, see http://mygui.info/ * Distributed under the MIT License * (See accompanying file COPYING.MIT or copy at http://opensource.org/licenses/MIT) */ #include "MyGUI_ControllerRepeatClick.h" namespace MyGUI { ControllerRepeatClick::ControllerRepeatClick() ...
/* * This source file is part of MyGUI. For the latest info, see http://mygui.info/ * Distributed under the MIT License * (See accompanying file COPYING.MIT or copy at http://opensource.org/licenses/MIT) */ #include "MyGUI_ControllerRepeatClick.h" namespace MyGUI { ControllerRepeatClick::ControllerRepeatClick() ...
Fix ControllerRepeatClick potential infinite loop for bad step values
Fix ControllerRepeatClick potential infinite loop for bad step values
C++
mit
Anomalous-Software/mygui,al2950/mygui,al2950/mygui,fmwviormv/mygui,al2950/mygui,fmwviormv/mygui,fmwviormv/mygui,Anomalous-Software/mygui,scrawl/mygui,Anomalous-Software/mygui,scrawl/mygui,scrawl/mygui,Anomalous-Software/mygui,fmwviormv/mygui,scrawl/mygui,al2950/mygui
0f6425fff33e4096b4e1fbfb954edae1349c0145
core/fpdfapi/fpdf_page/cpdf_contentmarkitem.cpp
core/fpdfapi/fpdf_page/cpdf_contentmarkitem.cpp
// Copyright 2016 PDFium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com #include "core/fpdfapi/fpdf_page/cpdf_contentmarkitem.h" #include "core/fpdfa...
// Copyright 2016 PDFium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com #include "core/fpdfapi/fpdf_page/cpdf_contentmarkitem.h" #include "core/fpdfa...
Add a missing initialisation for CPDF_ContentMarkItem.
Add a missing initialisation for CPDF_ContentMarkItem. R=dsinclair@chromium.org BUG=chromium:605491 Review URL: https://codereview.chromium.org/1910143002
C++
bsd-3-clause
DrAlexx/pdfium,DrAlexx/pdfium,DrAlexx/pdfium,DrAlexx/pdfium
31784a33a6a312a2225c6e08bbcf8f17b25ecf21
example/src/main.cpp
example/src/main.cpp
#include "ofMain.h" #include "ofApp.h" int main() { ofSetupOpenGL(600, 500, OF_WINDOW); ofRunApp(new ofApp()); }
#include "ofMain.h" #include "ofApp.h" int main() { #ifdef TARGET_RASPBERRY_PI ofSetupOpenGL(600, 500, OF_FULLSCREEN); #else ofSetupOpenGL(600, 500, OF_WINDOW); #endif ofRunApp(new ofApp()); }
Add fullscreen for Raspberry Pi
Add fullscreen for Raspberry Pi
C++
mit
PPilmeyer/ofxPiMapper
917114cbb2d0c367c172bae4bacdfbab5afbdd2f
example/demo_tcp_server.cpp
example/demo_tcp_server.cpp
#include <iostream> #include <tcp/tcp_server.hpp> #include <sstream> int main(int argc, char** argv) { //initialize default port number and max connection cout int port = 12001, max_connection_count= 1000; // check if there are any passed arguments if(argc > 1) { // initialize string stream from argumen...
#include <iostream> #include <tcp/tcp_server.hpp> #include <sstream> int main(int argc, char** argv) { //initialize default port number and max connection cout int port = 12001, max_connection_count= 1000; // check if there are any passed arguments if(argc > 1) { // initialize string stream from argumen...
Update tcp server demo add error msg
Update tcp server demo add error msg
C++
mit
samehkamaleldin/socket.cpp
fdd6feac19f4700fd795ca020c052210d586cf5b
validateBST.cpp
validateBST.cpp
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */ class Solution { public: bool isValidBSTInternal(TreeNode* root, int minVal, int maxVal) { if (root == NULL)...
#include <cstddef> #include <climits> /** * Definition for a binary tree node. */ struct TreeNode { int val; TreeNode *left; TreeNode *right; TreeNode(int x) : val(x), left(NULL), right(NULL) {} }; class Solution { public: bool isValidBSTInternal(TreeNode* root, int minVal, int maxVal) { ...
Clean up of the code.
Clean up of the code.
C++
mit
gnadathur/Coding
da73cca5e22619f858a054719d84a4625e4031ac
ReactCommon/react/renderer/scheduler/AsynchronousEventBeat.cpp
ReactCommon/react/renderer/scheduler/AsynchronousEventBeat.cpp
/* * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #include "AsynchronousEventBeat.h" namespace facebook { namespace react { AsynchronousEventBeat::AsynchronousEventBeat( RunLo...
/* * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #include "AsynchronousEventBeat.h" #include <react/debug/react_native_assert.h> namespace facebook { namespace react { Asynchron...
Migrate uses of NDEBUG to REACT_NATIVE_DEBUG + react_native_assert
ReactCommon/renderer/scheduler: Migrate uses of NDEBUG to REACT_NATIVE_DEBUG + react_native_assert Summary: For better cross-platform consistency, migrate usages of NDEBUG to REACT_NATIVE_DEBUG. See flags.h for explanation. Changelog: [Internal] Reviewed By: PeteTheHeat Differential Revision: D26695253 fbshipit-so...
C++
mit
javache/react-native,facebook/react-native,pandiaraj44/react-native,myntra/react-native,pandiaraj44/react-native,facebook/react-native,janicduplessis/react-native,javache/react-native,janicduplessis/react-native,pandiaraj44/react-native,arthuralee/react-native,myntra/react-native,myntra/react-native,myntra/react-native...
68b0cdb5cab194ec612ee1b8fd494362d932fae3
Test/Vector2fTest.cpp
Test/Vector2fTest.cpp
#include <gtest/gtest.h> #include "Vector2f.h" TEST(Vector2fTest, VectorAddition) { Vector2f v1(0, 0); Vector2f v2(1, 2); Vector2f v3(3, 4); Vector2f result = v1 + v1; EXPECT_FLOAT_EQ(0.0f, result.x); EXPECT_FLOAT_EQ(0.0f, result.y); result = v2 + v1; EXPECT_FLOAT_EQ(v2.x, result.x); EXPECT_FLOAT_EQ(v2.y,...
#include <gtest/gtest.h> #include "Vector2f.h" Vector2f v1(0,0); Vector2f v2(1, 2); Vector2f v3(3, 4); Vector2f v4(-5, 6); TEST(Vector2fTest, VectorAddition) { Vector2f result = v1 + v1; EXPECT_FLOAT_EQ(0.0f, result.x); EXPECT_FLOAT_EQ(0.0f, result.y); result = v2 + v1; EXPECT_FLOAT_EQ(v2.x, result.x); EXPE...
Add more unit tests for vector
Add more unit tests for vector
C++
mit
simon-bourque/2D-Game-Engine-Cpp,simon-bourque/2D-Game-Engine-Cpp
a26d420a0abf3ed1ac09b39fb39d7471621dd069
parse.cpp
parse.cpp
#include "cpptoml.h" #include <iostream> #include <cassert> int main(int argc, char** argv) { if (argc < 2) { std::cout << "Usage: " << argv[0] << " filename" << std::endl; return 1; } cpptoml::toml_group g = cpptoml::parse_file(argv[1]); std::cout << g << std::endl; return 0; ...
#include "cpptoml.h" #include <iostream> #include <cassert> int main(int argc, char** argv) { if (argc < 2) { std::cout << "Usage: " << argv[0] << " filename" << std::endl; return 1; } try { cpptoml::toml_group g = cpptoml::parse_file(argv[1]); std::cout << g << st...
Handle parsing errors in the example.
Handle parsing errors in the example. Aborting on invalid input is not especially user-friendly, even for a simple example.
C++
mit
Nephatrine/cpptoml,skystrife/cpptoml,skystrife/cpptoml,vadz/cpptoml,vadz/cpptoml,Payshares/cpptoml,zzzworm/cpptoml,Nephatrine/cpptoml,Payshare/cpptoml
da600e2bb7079ec64af2d4cc8a6df7218d417cbc
src/Game/CannonBall.cpp
src/Game/CannonBall.cpp
#include "Game/CannonBall.h" CannonBall::CannonBall(const QPixmap & pixmap, QVector2D velocity, QVector2D position, Player owner, QGraphicsItem * parent) : Entity(pixmap, owner, parent), m_initialVelocity(velocity), m_initialPosition(position), m_gravity(9.8), m_timeSinceShot(0) { setScale(0.1); setPos(m_initialPosi...
#include "Game/CannonBall.h" CannonBall::CannonBall(const QPixmap & pixmap, QVector2D velocity, QVector2D position, Player owner, QGraphicsItem * parent) : Entity(pixmap, owner, parent), m_initialVelocity(velocity), m_initialPosition(position), m_gravity(9.8), m_timeSinceShot(0) { setScale(0.1); setPos(m_initialPosi...
Call update in update entity
Call update in update entity
C++
mit
Sytten/Scorch,Sytten/Scorch
0f4f5747f43577078469e3b9907fa197be75de2f
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: %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...
Test case fix for r264783
[PGO] Test case fix for r264783 git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@264795 91177308-0d34-0410-b5e6-96231b3b80d8
C++
apache-2.0
apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-cl...
6693163358d0abb03853c146c8453d6fc9545646
lightex/utils/file_utils.cc
lightex/utils/file_utils.cc
#include <lightex/utils/file_utils.h> #include <fstream> #include <iostream> namespace lightex { namespace utils { bool ReadDataFromFile(const std::string& path, std::string* output) { if (!output) { std::cerr << "Error: output pointer points to invalid memory." << std::endl; return false; } std::ifst...
#include <lightex/utils/file_utils.h> #include <fstream> #include <iostream> #include <iterator> namespace lightex { namespace utils { bool ReadDataFromFile(const std::string& path, std::string* output) { if (!output) { std::cerr << "Error: output pointer points to invalid memory." << std::endl; return fal...
Fix VS2015 build: istream_iterator is not a member of std
Fix VS2015 build: istream_iterator is not a member of std
C++
mit
kostyaby/lightex,kostyaby/lightex,kostyaby/lightex
db06cc16af9cb0eaa766603f2e56f490041665db
ui/gfx/transform_util_unittest.cc
ui/gfx/transform_util_unittest.cc
// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "ui/gfx/transform_util.h" #include "ui/gfx/point.h" #include "testing/gtest/include/gtest/gtest.h" TEST(TransformUtilTest, GetScaleTransfor...
// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "ui/gfx/transform_util.h" #include "ui/gfx/point.h" #include "testing/gtest/include/gtest/gtest.h" namespace gfx { namespace { TEST(Transf...
Move transform_util unittest into gfx namespace.
ui/gfx: Move transform_util unittest into gfx namespace. TEST=ui_unittests TBR=sky@chromium.org Review URL: https://chromiumcodereview.appspot.com/11369173 git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@167060 0039d316-1c4b-4281-b951-d872f2087c98
C++
bsd-3-clause
pozdnyakov/chromium-crosswalk,Just-D/chromium-1,pozdnyakov/chromium-crosswalk,zcbenz/cefode-chromium,mogoweb/chromium-crosswalk,Pluto-tv/chromium-crosswalk,nacl-webkit/chrome_deps,hujiajie/pa-chromium,hujiajie/pa-chromium,dushu1203/chromium.src,jaruba/chromium.src,axinging/chromium-crosswalk,dednal/chromium.src,mohamed...
2a0c01c83071ddaeeabd8c6c6a4e033f3717e2c3
tests/DummyLoader/main.cpp
tests/DummyLoader/main.cpp
#include <windows.h> #include <tchar.h> #include <stdio.h> int _tmain(int argc, TCHAR * argv[]) { if(1 >= argc) { _tprintf(_T("DummLoader.exe <DllName>*\n")); return 0; } for(int i=1; i<argc; i++) { _tprintf(_T("Loading: \"%s\" "), argv[i]); HMODULE hm = LoadLibrary(argv[i]); _tprintf(_...
#include <windows.h> #include <tchar.h> #include <stdio.h> int _tmain(int argc, TCHAR * argv[]) { if(1 >= argc) { _tprintf(_T("DummLoader.exe <DllName>*\n")); return 0; } for(int i=1; i<argc; i++) { _tprintf(_T("Loading: \"%s\" "), argv[i]); HMODULE hm = LoadLibrary(argv[i]); DWORD last...
Add GetLastError info to DummyLoader test
Add GetLastError info to DummyLoader test
C++
mit
ripieces/advancedfx,ripieces/advancedfx,ripieces/advancedfx,ripieces/advancedfx
1ca81a65c1b9d9a0334c89154ffb6836cb1c31f2
src/gui-qml/src/main.cpp
src/gui-qml/src/main.cpp
#include <QGuiApplication> #include <QQmlApplicationEngine> #include <QQmlContext> #include "functions.h" #include "main-screen.h" #include "models/profile.h" int main(int argc, char *argv[]) { QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling); QGuiApplication app(argc, argv); app.setApplicationName("Gr...
#include <QDir> #include <QGuiApplication> #include <QQmlApplicationEngine> #include <QQmlContext> #include "functions.h" #include "main-screen.h" #include "models/profile.h" int main(int argc, char *argv[]) { QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling); QGuiApplication app(argc, argv); app.setApp...
Copy necessary assets on Android QML startup
Copy necessary assets on Android QML startup
C++
apache-2.0
Bionus/imgbrd-grabber,Bionus/imgbrd-grabber,Bionus/imgbrd-grabber,Bionus/imgbrd-grabber,Bionus/imgbrd-grabber,Bionus/imgbrd-grabber
9d453f506950da0f3c09b268281eeb8e73d62ce4
source/obj_loader_demo/main.cpp
source/obj_loader_demo/main.cpp
/* The Halfling Project - A Graphics Engine and Projects * * The Halfling Project is the legal property of Adrian Astley * Copyright Adrian Astley 2013 */ #include "obj_loader_demo/obj_loader_demo.h" int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { ObjLoaderDemo:...
/* The Halfling Project - A Graphics Engine and Projects * * The Halfling Project is the legal property of Adrian Astley * Copyright Adrian Astley 2013 */ #include "obj_loader_demo/obj_loader_demo.h" int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { ObjLoaderDemo:...
Use 1280 x 720 as the default resolution
OBJ_LOADER_DEMO: Use 1280 x 720 as the default resolution
C++
apache-2.0
RichieSams/thehalflingproject,RichieSams/thehalflingproject,RichieSams/thehalflingproject
29fa3fc49fe3a05b111aa12200d081b1bdf01efe
vespalib/src/vespa/vespalib/util/mmap_file_allocator_factory.cpp
vespalib/src/vespa/vespalib/util/mmap_file_allocator_factory.cpp
// Copyright Verizon Media. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "mmap_file_allocator_factory.h" #include "mmap_file_allocator.h" #include <vespa/vespalib/stllike/asciistream.h> namespace vespalib::alloc { MmapFileAllocatorFactory::MmapFileAllocatorFactory() ...
// Copyright Verizon Media. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "mmap_file_allocator_factory.h" #include "mmap_file_allocator.h" #include <vespa/vespalib/io/fileutil.h> #include <vespa/vespalib/stllike/asciistream.h> namespace vespalib::alloc { MmapFileAlloca...
Remove old swap files when setting up mmap file allocator.
Remove old swap files when setting up mmap file allocator.
C++
apache-2.0
vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa
cb045efbdedd040189a6bc35f087808a2fcfd4db
main.cpp
main.cpp
// TODO: remove this later, hack for include order issues #include "GLBlaat/GL.h" #include <QApplication> #include "Gui/MainWindow.h" int main(int argc, char *argv[]) { // Set up Qt application QApplication app(argc, argv); VFE::MainWindow *window = new VFE::MainWindow(); // Go! window->show(); ...
// TODO: remove this later, hack for include order issues #include "GLBlaat/GL.h" #include <QApplication> #include "Gui/MainWindow.h" #include <vtkWin32ProcessOutputWindow.h> int main(int argc, char *argv[]) { #ifdef WIN32 // Use a more useful output window for VTK vtkWin32ProcessOutputWindow *ow = vt...
Use a VTK output window we can actually read if the app crashes.
Use a VTK output window we can actually read if the app crashes.
C++
mit
bwrrp/multifieldexplorer
bde6e843a6c5da0d3423c3597770aa9f135f7d8c
src/osvr/ClientKit/ContextC.cpp
src/osvr/ClientKit/ContextC.cpp
/** @file @brief Implementation @date 2014 @author Ryan Pavlik <ryan@sensics.com> <http://sensics.com> */ // Copyright 2014 Sensics, Inc. // // All rights reserved. // // (Final version intended to be licensed under // the Apache License, Version 2.0) // Internal Includes #include <osvr/Clie...
/** @file @brief Implementation @date 2014 @author Ryan Pavlik <ryan@sensics.com> <http://sensics.com> */ // Copyright 2014 Sensics, Inc. // // All rights reserved. // // (Final version intended to be licensed under // the Apache License, Version 2.0) // Internal Includes #include <osvr/Clie...
Add a quick and dirty way to access a remote OSVR server: using the environment variable OSVR_HOST.
Add a quick and dirty way to access a remote OSVR server: using the environment variable OSVR_HOST.
C++
apache-2.0
Armada651/OSVR-Core,Armada651/OSVR-Core,OSVR/OSVR-Core,Armada651/OSVR-Core,Armada651/OSVR-Core,leemichaelRazer/OSVR-Core,OSVR/OSVR-Core,leemichaelRazer/OSVR-Core,OSVR/OSVR-Core,d235j/OSVR-Core,godbyk/OSVR-Core,feilen/OSVR-Core,OSVR/OSVR-Core,godbyk/OSVR-Core,Armada651/OSVR-Core,leemichaelRazer/OSVR-Core,godbyk/OSVR-Cor...
9cbf57ac65f9daaf1a44803ce9bdf15a1e7b91b2
source/globjects/source/implementations/ShadingLanguageIncludeImplementation_ShadingLanguageIncludeARB.cpp
source/globjects/source/implementations/ShadingLanguageIncludeImplementation_ShadingLanguageIncludeARB.cpp
#include "ShadingLanguageIncludeImplementation_ShadingLanguageIncludeARB.h" #include <glbinding/gl/functions.h> #include <globjects/Shader.h> #include <globjects/base/AbstractStringSource.h> using namespace gl; namespace globjects { void ShadingLanguageIncludeImplementation_ARB::updateSources(const Shader * ...
#include "ShadingLanguageIncludeImplementation_ShadingLanguageIncludeARB.h" #include <glbinding/gl/functions.h> #include <globjects/Shader.h> #include <globjects/base/AbstractStringSource.h> using namespace gl; namespace globjects { void ShadingLanguageIncludeImplementation_ARB::updateSources(const Shader * ...
Fix shading language include paths
Fix shading language include paths
C++
mit
cginternals/globjects,j-o/globjects,j-o/globjects,j-o/globjects,j-o/globjects,cginternals/globjects
91d129a90c42b5ba376caa6f0fa8738909441cb2
common/kafka/stats_enum.cpp
common/kafka/stats_enum.cpp
/// Copyright 2019 Pinterest 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 t...
/// Copyright 2019 Pinterest 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 t...
Add a new flag for cluster name
[kafka] Add a new flag for cluster name It's cleaner for the cluster name to be a separate flag (than being included in the suffix). Separating it out in this diff.
C++
apache-2.0
pinterest/rocksplicator,pinterest/rocksplicator,pinterest/rocksplicator,pinterest/rocksplicator,pinterest/rocksplicator
0c9db0d808f8f480de79ac944a96f0ee7c37b708
source/gloperate/source/capabilities/TypedRenderTargetCapability.cpp
source/gloperate/source/capabilities/TypedRenderTargetCapability.cpp
/******************************************************************************\ * gloperate * * Copyright (C) 2014 Computer Graphics Systems Group at the * Hasso-Plattner-Institut (HPI), Potsdam, Germany. \******************************************************************************/ #include <gloperate/capabili...
/******************************************************************************\ * gloperate * * Copyright (C) 2014 Computer Graphics Systems Group at the * Hasso-Plattner-Institut (HPI), Potsdam, Germany. \******************************************************************************/ #include <gloperate/capabili...
Add clear map on destruction
Add clear map on destruction
C++
mit
lanice/gloperate,Beta-Alf/gloperate,Beta-Alf/gloperate,Beta-Alf/gloperate,lanice/gloperate,lanice/gloperate,hpi-r2d2/gloperate,cginternals/gloperate,hpicgs/gloperate,p-otto/gloperate,p-otto/gloperate,j-o/gloperate,lanice/gloperate,hpicgs/gloperate,Beta-Alf/gloperate,j-o/gloperate,j-o/gloperate,p-otto/gloperate,lanice/g...
337ba1204ac86a533edbb3422ab85e1f307d47a6
Listener.cpp
Listener.cpp
#include "stdafx.h" #include <string> #include "Listener.h" using namespace DShowLib; // Increments the number of processed frames void CListener::frameReady(Grabber& caller, smart_ptr<MemBuffer> pBuffer, DWORD currFrame) { done++; }
#include "stdafx.h" #include <string> #include "Listener.h" using namespace DShowLib; // Increments the number of processed frames void CListener::frameReady(Grabber& caller, smart_ptr<MemBuffer> pBuffer, DWORD currFrame) { MessageBeep(-1); done++; }
Add sound when frame is ready
Add sound when frame is ready
C++
mit
touste/StereoCapture,touste/StereoCapture
7db88a2ff4adf76cda87741b822a978d1111a098
test/blinky/main.cpp
test/blinky/main.cpp
/* mbed Microcontroller Library * Copyright (c) 2013-2014 ARM Limited * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless re...
/* mbed Microcontroller Library * Copyright (c) 2013-2014 ARM Limited * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless re...
Test - fix blinky test - print host test result
Test - fix blinky test - print host test result
C++
apache-2.0
bremoran/mbed-drivers,bremoran/mbed-drivers,0xc0170/mbed-drivers,0xc0170/mbed-drivers
b7ebc7070f989f29126819162352ee6e340ee9ed
lib/libport/backtrace.cc
lib/libport/backtrace.cc
#include <cstdlib> #include <libport/backtrace.hh> #include <libport/config.h> #if LIBPORT_HAVE_EXECINFO_H # include <execinfo.h> namespace libport { std::vector<const char*> backtrace() { enum { size = 128 }; void* callstack[size]; size_t frames = ::backtrace(callstack, size); char** strs = ba...
#include <cstdlib> #include <libport/backtrace.hh> #include <libport/config.h> #if LIBPORT_HAVE_EXECINFO_H # include <execinfo.h> # include <cstdlib> namespace libport { std::vector<const char*> backtrace() { enum { size = 128 }; void* callstack[size]; size_t frames = ::backtrace(callstack, size); ...
Add forgotten include and return.
Add forgotten include and return. * lib/libport/backtrace.cc: Here.
C++
bsd-3-clause
aldebaran/libport,aldebaran/libport,aldebaran/libport,aldebaran/libport,aldebaran/libport
64b29af901e48c1b16b567a46f59d9c1f62a399c
src/instr/instr.cpp
src/instr/instr.cpp
#include "instr.h" namespace sasm { namespace instr { instr::instr(const sasm::elf::elf& elf, uint64 addr) : _elf(elf), _addr(addr) { } void instr::_dump_addr(std::ostream& out) const { out << "0x" << std::hex << _addr << std::dec << ": "; } }}
#include "instr.h" namespace sasm { namespace instr { instr::instr(const sasm::elf::elf& elf, uint64 addr) : _elf(elf), _addr(addr) { } void instr::_dump_addr(std::ostream& out) const { try { auto sym = _elf.symtab[_addr]; if (sym.type == sasm::elf::symtab::symbol::sym_type::func) out << std::en...
Print function symbols when dumping asm.
Print function symbols when dumping asm.
C++
bsd-2-clause
sas/sasm,sas/sasm
28e4929f428f7d2dedd983c2638bbf2d4704e1ea
src/nodestate.cpp
src/nodestate.cpp
// Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2015 The Bitcoin Core developers // Copyright (c) 2015-2017 The Bitcoin Unlimited developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "nodestate.h...
// Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2015 The Bitcoin Core developers // Copyright (c) 2015-2017 The Bitcoin Unlimited developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "nodestate.h...
Initialize all variables for CNodeState
Initialize all variables for CNodeState
C++
mit
BitcoinUnlimited/BitcoinUnlimited,BitcoinUnlimited/BitcoinUnlimited,Justaphf/BitcoinUnlimited,Justaphf/BitcoinUnlimited,BitcoinUnlimited/BitcoinUnlimited,Justaphf/BitcoinUnlimited,BitcoinUnlimited/BitcoinUnlimited,BitcoinUnlimited/BitcoinUnlimited,Justaphf/BitcoinUnlimited,Justaphf/BitcoinUnlimited,BitcoinUnlimited/Bit...
cf4d0186e22f294b69941b78e2c3eb6cf1a53a11
main.cpp
main.cpp
#include <iostream> #include <conio.h> #include <cstdlib> #include <cmath> #include <iomanip> using namespace std; /* run this program using the console pauser or add your own getch, system("pause") or input loop */ int main(int argc, char** argv) { cout << "Szymon Blaszczynski" << endl; cout << setprecision(8) <<...
#include <iostream> // #include <conio.h> // getch // #include <cstdlib> # system #include <cmath> #include <iomanip> using namespace std; /* run this program using the console pauser or add your own getch, system("pause") or input loop */ int main(int argc, char** argv) { cout << "Szymon Blaszczynski" << endl; co...
Read two integers and write them out
Read two integers and write them out
C++
agpl-3.0
neosb/davinci-programowanie,neosb/davinci-programowanie
ca97e947810313f301fabfb75bc6f5608e0c5990
src/object/delegate-class.cc
src/object/delegate-class.cc
/** ** \file object/delegate-class.cc ** \brief Creation of the URBI object delegate. */ #include "object/delegate-class.hh" #include "object/object.hh" #include "object/primitives.hh" #include "runner/runner.hh" namespace object { rObject delegate_class; /*-----------------------. | Primitive primitives. ...
/** ** \file object/delegate-class.cc ** \brief Creation of the URBI object delegate. */ #include "object/delegate-class.hh" #include "object/object.hh" #include "object/primitives.hh" #include "runner/runner.hh" namespace object { rObject delegate_class; /*-----------------------. | Primitive primitives. ...
Add apply to Delegate type.
Add apply to Delegate type. * src/object/delegate-class.cc (delegate_class_apply): New.
C++
bsd-3-clause
aldebaran/urbi,aldebaran/urbi,aldebaran/urbi,aldebaran/urbi,urbiforge/urbi,urbiforge/urbi,aldebaran/urbi,urbiforge/urbi,aldebaran/urbi,aldebaran/urbi,urbiforge/urbi,urbiforge/urbi,urbiforge/urbi,urbiforge/urbi,urbiforge/urbi,urbiforge/urbi,aldebaran/urbi
7dd4490e47a5348d3f5c6e05946f84666eceaec7
test/CodeGenCXX/value-init.cpp
test/CodeGenCXX/value-init.cpp
// RUN: %clang_cc1 %s -triple x86_64-apple-darwin10 -emit-llvm -o - | FileCheck %s struct A { virtual ~A(); }; struct B : A { }; struct C { int i; B b; }; // CHECK: _Z15test_value_initv void test_value_init() { // This value initialization requires zero initialization of the 'B' // subobject followed by a...
// RUN: %clang_cc1 %s -triple x86_64-apple-darwin10 -emit-llvm -o - | FileCheck %s struct A { virtual ~A(); }; struct B : A { }; struct C { int i; B b; }; // CHECK: _Z15test_value_initv void test_value_init() { // This value initialization requires zero initialization of the 'B' // subobject followed by a...
Fix test case to unbreak testing
Fix test case to unbreak testing git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@91551 91177308-0d34-0410-b5e6-96231b3b80d8
C++
apache-2.0
apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-cl...
73a798382fc00bd3a61fc26db8d29b247c432362
excercise04/sort/insertion.cpp
excercise04/sort/insertion.cpp
#include "insertion.hpp" #include "swap.hpp" void insertion(int *data, int size_of_data) { for(int i = 0; i < size_of_data; ++i) { int j; for(j = i; data[j] < data[i]; --j); swap(data[i], data[j]); } }
#include "insertion.hpp" #include "swap.hpp" void insertion(int *data, int size_of_data) { for(int i = 0; i < size_of_data; ++i) { int j; for(j = i; j >= 0 && data[j] < data[i]; --j); swap(data[i], data[j]); } }
Add boundary value in loop expression
Add boundary value in loop expression
C++
mit
kdzlvaids/algorithm_and_practice-pknu-2016,kdzlvaids/algorithm_and_practice-pknu-2016
df8ff20f168063c5df6b13127dfa67fac16928b9
TopCoder/DynamicProgramming/IncrementAndDoubling/IncrementAndDoubling.cpp
TopCoder/DynamicProgramming/IncrementAndDoubling/IncrementAndDoubling.cpp
#include <iostream> #include <vector> #include <algorithm> #include <string> #include <iterator> using namespace std; int getMinHelper(vector<int> DesiredArray, int Moves) { if(all_of(begin(DesiredArray), end(DesiredArray), [] (const int & element) {return element==0;})) { return Moves; } ...
#include <iostream> #include <vector> #include <algorithm> #include <string> #include <iterator> using namespace std; class IncrementAndDoubling { public: int getMinHelper(vector<int> DesiredArray, int Moves) { if(all_of(begin(DesiredArray), end(DesiredArray), [] (const int & element) {...
Put functions in the required class
Put functions in the required class
C++
mit
busebd12/InterviewPreparation,busebd12/InterviewPreparation,busebd12/InterviewPreparation
2cf94f18ec6939b51d60f583bacb3592f948a53f
examples/apps/embedded/embedded.cpp
examples/apps/embedded/embedded.cpp
#include "embedded.h" #include <QtCore> #include <QVBoxLayout> #include <QApplication> #include <QDesktopWidget> #include <maliit/namespace.h> #include <maliit/inputmethod.h> MainWindow::MainWindow() : QMainWindow() { initUI(); } MainWindow::~MainWindow() {} void MainWindow::initUI() { setWindowTitle("...
#include "embedded.h" #include <QtCore> #include <QVBoxLayout> #include <QApplication> #include <QDesktopWidget> #include <maliit/namespace.h> #include <maliit/inputmethod.h> MainWindow::MainWindow() : QMainWindow() { initUI(); } MainWindow::~MainWindow() {} void MainWindow::initUI() { setWindowTitle("...
Remove now unneded hack from embedding example.
Remove now unneded hack from embedding example. RevBy: Jon Nordby, Michael Hasselmann, Jan Arne Petersen
C++
lgpl-2.1
binlaten/framework,RHawkeyed/framework,Elleo/framework,Elleo/framework,RHawkeyed/framework,jpetersen/framework,jpetersen/framework
84ae200d35ae7efd349aa49075be360d99a38de4
src/main.cpp
src/main.cpp
#include "messmer/cpp-utils/tempfile/TempDir.h" #include "messmer/fspp/fuse/Fuse.h" #include "messmer/fspp/impl/FilesystemImpl.h" #include "CopyDevice.h" using cpputils::TempDir; using copyfs::CopyDevice; using fspp::FilesystemImpl; using fspp::fuse::Fuse; int main (int argc, char *argv[]) { TempDir dir; CopyDevi...
#include "messmer/cpp-utils/tempfile/TempDir.h" #include "messmer/fspp/fuse/Fuse.h" #include "messmer/fspp/impl/FilesystemImpl.h" #include "CopyDevice.h" #include <iostream> using cpputils::TempDir; using copyfs::CopyDevice; using fspp::FilesystemImpl; using fspp::fuse::Fuse; int main (int argc, char *argv[]) { Tem...
Use cout instead of printf
Use cout instead of printf
C++
apache-2.0
cryfs/copyfs
41689848bc47c304350c3c613655ea5df98c60fb
tools/args/verifier.cc
tools/args/verifier.cc
// Copyright 2013-2015 Eric Schkufza, Rahul Sharma, Berkeley Churchill, Stefan Heule // // 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 /...
// Copyright 2013-2015 Eric Schkufza, Rahul Sharma, Berkeley Churchill, Stefan Heule // // 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 /...
Add command line help for --strategy formal
Add command line help for --strategy formal
C++
apache-2.0
jyi/abc,jyi/abc,jyi/abc,jyi/abc,jyi/abc,jyi/abc
70850d7669795d526f376bce2c60f2a42867a387
gui/main.cpp
gui/main.cpp
#include "mainwindow.h" #include <QApplication> #include <QFile> #include "applicationdata.h" #include "blocktype.h" #include <QJsonDocument> #include <QJsonArray> int main(int argc, char *argv[]) { QApplication a(argc, argv); QString appDir = a.applicationDirPath(); QString xmlPath = appDir + "/blocks.j...
#include "mainwindow.h" #include <QApplication> #include <QFile> #include "applicationdata.h" #include "blocktype.h" #include <QJsonDocument> #include <QJsonArray> #include <QMessageBox> int main(int argc, char *argv[]) { QApplication a(argc, argv); QString appDir = a.applicationDirPath(); QString xmlPat...
Handle errors loading block types
Handle errors loading block types
C++
mit
SignalCraft/SignalCraft-Designer,UnnamedCompany/UnnamedSoftware,SignalCraft/SignalCraft-Designer,UnnamedCompany/UnnamedSoftware
fe4f0857475910db8df6ed33852e447a7a01106c
python2-pybind11/challenge/containers.cpp
python2-pybind11/challenge/containers.cpp
#include <pybind11/pybind11.h> #include "basics.hpp" #include "containers.hpp" namespace py = pybind11; PYBIND11_DECLARE_HOLDER_TYPE(T, std::shared_ptr<T>); namespace containers { PYBIND11_PLUGIN(containers) { py::module m("containers", "wrapped C++ containers module"); py::class_<containers::DoodadSet>(m...
#include <pybind11/pybind11.h> #include <pybind11/stl.h> #include "basics.hpp" #include "containers.hpp" namespace py = pybind11; PYBIND11_DECLARE_HOLDER_TYPE(T, std::shared_ptr<T>); namespace containers { PYBIND11_PLUGIN(containers) { py::module m("containers", "wrapped C++ containers module"); py::class...
Support assignment and conversion to lists and dicts.
Support assignment and conversion to lists and dicts.
C++
mit
TallJimbo/python-cpp-challenge,TallJimbo/python-cpp-challenge
7ba988a22cf56bb90b800a733220f918d48d27cc
You-DataStore-Tests/datastore_api_test.cpp
You-DataStore-Tests/datastore_api_test.cpp
#include "stdafx.h" #include "CppUnitTest.h" #include "datastore.h" #include "transaction.h" #include "internal/operations/post_operation.h" #include "dummy_values.h" using Assert = Microsoft::VisualStudio::CppUnitTestFramework::Assert; namespace You { namespace DataStore { namespace UnitTests { TEST_CLASS(DataStore...
#include "stdafx.h" #include "CppUnitTest.h" #include "datastore.h" #include "transaction.h" #include "internal/operations/post_operation.h" #include "dummy_values.h" using Assert = Microsoft::VisualStudio::CppUnitTestFramework::Assert; namespace You { namespace DataStore { namespace UnitTests { TEST_CLASS(DataStore...
Modify test to be correct
Modify test to be correct
C++
mit
cs2103aug2014-w10-1c/main,cs2103aug2014-w10-1c/main
be15bfa36d242c63c01d22d5ca663b5229886795
test/Modules/self-referencing-lambda.cpp
test/Modules/self-referencing-lambda.cpp
// RUN: rm -rf %t // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I %S/Inputs/self-referencing-lambda %s -verify -emit-obj -o %t2.o // expected-no-diagnostics #include "a.h"
// RUN: rm -rf %t // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I %S/Inputs/self-referencing-lambda %s -verify -emit-obj -std=c++14 -o %t2.o // expected-no-diagnostics #include "a.h"
Update test to mention it requires C++14.
[Modules] Update test to mention it requires C++14. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@328283 91177308-0d34-0410-b5e6-96231b3b80d8 (cherry picked from commit e8d80b7dba2329bb4ee2e507bfd6496053df542b)
C++
apache-2.0
apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang
2bcdb926fab721af9f7ad291c5088a6e0dbd64df
tests/PrologLifetimeTest.cpp
tests/PrologLifetimeTest.cpp
#include "gtest/gtest.h" #include "PrologInterface.h" #include <iostream> namespace { static int glob_argc; static char **glob_argv; class PrologLifetimeTest : public ::testing::Test { }; TEST_F(PrologLifetimeTest, BeginInitializesProlog) { PrologLifetime::begin(glob_argc, glob_argv); ASSERT_TRUE(PL_is_initial...
#include "gtest/gtest.h" #include "PrologInterface.h" #include <iostream> namespace { static int glob_argc; static char **glob_argv; class PrologLifetimeTest : public ::testing::Test { }; TEST_F(PrologLifetimeTest, BeginInitializesProlog) { PrologLifetime::begin(glob_argc, glob_argv); ASSERT_TRUE(PL_is_initial...
Test multiple initialization for SWI-Prolog
Test multiple initialization for SWI-Prolog
C++
mit
henry-nazare/swipl-cpp-bindings
5d9d82e8dad36510f566e9dff2f62c14ebb4804b
src/eepparam.cpp
src/eepparam.cpp
#include"ics3/eepparam.hpp" #include<stdexcept> constexpr int byteSize {4}; constexpr uint16_t mask {0xF}; void ics::EepParam::write(std::array<uint8_t, 64>& dest) const noexcept { uint16_t nowData {data}; for (size_t i {offset + length - 1}; i >= offset; --i) { dest[i] = nowData & mask; nowData >>= byte...
#include"ics3/eepparam.hpp" #include<stdexcept> constexpr int byteSize {4}; constexpr uint16_t mask {0xF}; void ics::EepParam::write(std::array<uint8_t, 64>& dest) const noexcept { uint16_t nowData {data}; for (size_t i {offset + length - 1}; i >= offset; --i) { dest[i] = nowData & mask; nowData >>= byte...
Update read method for readability
Update read method for readability
C++
bsd-2-clause
forno/libics3,forno/libics3
c04ba86d75b2ff4891f2836a77011be652277b15
Native.cpp
Native.cpp
#include <Headers\Native IO Board\MainStream IO\Native MainInput\IO Board.h> using namespace std; int main() { }
#include <Headers\Native IO Board\MainStream IO\Native MainInput\IO Board.h> int main() { }
Remove standard namespace from source file.
Remove standard namespace from source file. The standard namespace is included in the Native IO Board header. So it does not need to be included in the main source file.
C++
mit
Project-CPP/Native-Terminal
d9779290387f38b6e0b23c281c428a0614b77268
test/CodeGenCXX/virtual-operator-call.cpp
test/CodeGenCXX/virtual-operator-call.cpp
// RUN: %clang_cc1 %s -triple i386-unknown-unknown -emit-llvm -o - | FileCheck %s struct A { virtual int operator-() = 0; }; void f(A *a) { // CHECK: call i32 % -*a; }
// RUN: %clang_cc1 %s -triple i386-unknown-unknown -emit-llvm -o - | FileCheck %s struct A { virtual int operator-(); }; void f(A a, A *ap) { // CHECK: call i32 @_ZN1AngEv(%struct.A* %a) -a; // CHECK: call i32 % -*ap; }
Add a test for devirtualization of virtual operator calls.
Add a test for devirtualization of virtual operator calls. There was no test coverage for this before: Modifiying EmitCXXOperatorMemberCallee() to not call CanDevirtualizeMemberFunctionCall() didn't make any test fail. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@223056 91177308-0d34-0410-b5e6-96231b3b80d8
C++
apache-2.0
apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/cl...
0fde39f888be4b75ccb1eed17705ec715d5cbab2
Trees/binary-tree-preorder-inorder-successor.cpp
Trees/binary-tree-preorder-inorder-successor.cpp
/******************************************************************************* Binary tree preorder inorder successor ====================================== -------------------------------------------------------------------------------- Problem ======= Finding the preoder and inorder successor in a binary stack r...
/******************************************************************************* Binary tree preorder inorder successor ====================================== -------------------------------------------------------------------------------- Problem ======= Finding the preoder and inorder successor in a binary stack r...
Update Binary tree preorder inorder successor
Update Binary tree preorder inorder successor
C++
mit
divyanshu013/algorithm-journey